-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error, unexpected T_MATCH #196
Comments
Possibly new PHP-Parser running with PHP 8.x compat? |
Hmm, sorry I forgot to mention the versions. PHP When checking the version, I discovered, that this bug seems to be gone in PHP |
ok... it's not related to the PHP version, but version of Edit: Its already a known issue there: nikic/PHP-Parser#690 |
I don't think the version should be restricted there: rather, the parser being used should be configured. I think it's configured correctly here:
Probably need to report an issue upstream. |
There is, already: nikic/PHP-Parser#690 |
As commented by @nikic in that issue,
So still needs a fix here. |
You might also just want to not use emulation at all for this use case (i.e. parse for the PHP version you're running on). |
@nikic do you mean passing |
Follow-up: It works for me now with |
Hi, I still have the problem with |
no, I did not change anything. which php version do you use? |
7.4 |
You're right. My error didn't disappear because of a new php-parser version but because PHPUnit removed the offending class: sebastianbergmann/phpunit@b57cd45 |
We encounter some strange behavior lately. On some projects/libraries, the checker returns the following error:
It seems to be somehow related to PHPunit when it is installed as non-dev dependency.
Psalm also had a similar problem but fixed it already: vimeo/psalm#3901
The error disappears when I remove the
extends Match
from\PHPUnit\Framework\MockObject\Builder\ParametersMatch
lins 15.Anyone has a clue what's going on there?
The text was updated successfully, but these errors were encountered: