Hey @enumag, can you reproduce the issue on https://psalm.dev ?
When using the emulated mode nikic/php-parser 4.7 cannot correctly parse the valid PHP 7.4 code <?php class Match {} (which appears in PHPUnit, among other places).
The latest master version of the parser has a fix for this – once there's a release I'll bump the requirement.
I see. In that case since you already know it will be fixed in the next version of php-parser you might want to bump the requirement to ^4.3 !=4.7.0. This would allow installing ^4.7@dev.
The latest master version of the parser has a fix for this – once there's a release I'll bump the requirement.
Just in case, PHP-Parser 4.8.0 is released.
@morozov ^4.8 is already in master branch, next release will have it sorted
Most helpful comment
When using the emulated mode
nikic/php-parser4.7 cannot correctly parse the valid PHP 7.4 code<?php class Match {}(which appears in PHPUnit, among other places).The latest master version of the parser has a fix for this – once there's a release I'll bump the requirement.