Replies: 1 comment
-
Yeah, this is challenging. PHPStan can analyse projects which use nikic/PHP-Parser v5 mostly without problems, but you can run into issues like these because PHPStan will see the classes from its own PHAR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
some code using
nikic/php-parser
v4 was usingPhpParser\Node\Scalar\LNumber
class which does not exist anymore in v5.When upgrading to
nikic/php-parser
v5, phpstan does not yell for the non-existing class. Even the whole phpunit suite using this piece of code was green. I'm wondering if the reason is not that phpstan is bundled withnikic/php-parser
v4?The only way to reproduce the error in local was to do
Do you know any way to be protected against this kind of things, and to make phpstan yell at us for this?
thanks for your answer!
Beta Was this translation helpful? Give feedback.
All reactions