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
Crash in StubPhpDocProvider #3885
Comments
This bug report is missing a link to reproduction on phpstan.org. |
Ran into this error as well. The last version that works for me is 0.12.42. Versions 43-45 all throw this error. |
Maybe it is related to https://github.com/zircote/swagger-php again? There were few issues with that package before. |
@canvural I forgot to mention it, but IIRC it is related to that package. |
@greg0ire So did you open an issue there? |
Why should I? Phpstan is not supposed to crash with that message, no matter what it analyzes, is it? |
Ran into the same problem. Using version |
Are you all also using swagger-php? |
If you don't include the
Looks like it was attempted to fix, but decided it's an issue with php-parser |
@ondrejmirtes Yes. |
@ondrejmirtes It appears to be an indirect dependency in my project too. |
@canvural That issue seems to have been solved by php-parser 4.10.2 and completely unrelated. If I remove phpstan-symfony from my project I still get the same error with StubPhpDocProvider. |
IIIRC removing this part of the extension file fixes the issue:
So does downgrading the zircote lib. |
@ondrejmirtes how do you usually debug that kind of stuff? I pushed a new commit that allows to reproduce the issue with There is an extra instruction that is needed when using that method: |
Looks like this bug is going to be solved by upgrading nikic/php-parser to 4.10.2. I'm gonna push a release soon. |
Fixed by: phpstan/phpstan-src@e7203bc PHPStan 0.12.46 will be out shortly after. |
And it's out :) https://github.com/phpstan/phpstan/releases/tag/0.12.46 |
Works great! Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
After upgrading my app, I'm getting this mysterious crash:
Code snippet that reproduces the problem
Expected output
Some errors, but no crash.
The text was updated successfully, but these errors were encountered: