Syntax errors when running against PHP 7.1 codebase
Hello,
I'm discovering psecio-parse and I've just ran it on my codebase.
I've opened this issue to report errors when running it against a PHP 7.1 codebase:
private const MY_PRIVATE_CONST = 'hello';
^ this will throw an error "Syntax error, unexpected T_CONST, expecting T_FUNCTION"
public function hello(?string $name): string
^ this will throw an error "unexpected ?, expecting T_VARIABLE
I believe these errors come from nikic/php-parser, right? Your composer.json locks it to version 2.0 (resolving to 2.1.1 back from 2016) when version 4.0 is out and supports newer syntax. So maybe updating the parser would simply solve these issues.
Also, it would be great if you could provide phar archives for releases and don't limit the symfony/console dependency to version 3.2 max ;)
Cheers and I wish the best to this project! :)
~Nico
@NicolasCARPi , please send PR for each of the things mentioned (3 PR in total if I'm not mistaken).
@aik099 I did a PR. But the result is not really what I hoped; see comment on PR ;)
The main reason why PHP 7.1 code is not supported, is that this package used "nikic/php-parser": "^2.0" constraint.
I suggest to upgrade it to at least 3.0; better will be 4.0
@llaville Indeed. Unfortunately, this project seems abandoned anyway.
@NicolasCARPi Bad news to hear !