wp-hooks / generator

Generates a JSON representation of the WordPress actions and filters in your code
https://packagist.org/packages/wp-hooks/generator
78 stars 6 forks source link

Output file that contains a parse error #5

Closed kkmuffme closed 2 years ago

kkmuffme commented 2 years ago

Parse Error: Syntax error, unexpected '?', expecting T_VARIABLE on line 14Parse Error: Syntax error, unexpected '?', expecting T_VARIABLE on line 138Parse Error: Syntax error, unexpected '?', expecting T_VARIABLE on line 14Done

No idea in which files the tool encountered a parse error. Would it be possible to include the file name in the error message?

johnbillion commented 2 years ago

Where do you see this error please? During generation? Which version of PHP are you using?

kkmuffme commented 2 years ago

when running php vendor/bin/wp-hooks-generator --input=some-path --output=output-path --ignore-files="/includes/lib/,/vendor/"

PHP 7.4.24

The reason why it throws this parse error is bc of public function __construct(?array $record) (and similar), which I found by iterating over all directories and running the above command

johnbillion commented 2 years ago

This should have been fixed by the bump to the dependencies too, let me know if that's not the case.

kkmuffme commented 2 years ago

Fyi the issue is still there, since the version bump was reversed