-
-
Notifications
You must be signed in to change notification settings - Fork 916
PHPStan 2.0: Internal error mixing local deps with phpstan deps #12293
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
Comments
This bug report is missing a link to reproduction at phpstan.org/try. It will most likely be closed after manual review. |
Please show the full stack trace. |
@ondrejmirtes that's one of the pain points: I have no stack trace :/ |
What you see when you run PHPStan with |
Here it is!
|
PHPStan actually uses some code from inside your app too. You configured the phpstan-symfony extension to use the The bug that's causing PHPStan to crash is here:
Fortunately a new version of So upgrade to 5.6.0 or 5.6.1 and you're good to go! |
@ondrejmirtes maybe phpstan 2.x should define a composer.json conflict with the too old version of the 3rd party lib? |
@staabm I wouldn't do that. Not everyone with the "bad" version will experience this problem. |
I'm sorry for this bug opening, I was pretty sure to have already run At least it document how to fix it now 😄 . |
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
I wanted to upgrade to phpstan 2 but I ended up with errors like this:
Some of them was solvable by upgrading local dependencies. Some others are blocking because I cannot upgrade local dependencies. By "local" I mean the
vendor
/composer.json
of my project, because I'm installing phpstan in another folder. (I also tried to install phpstan directly on the project, still didn't work)Code snippet that reproduces the problem
No response
Expected output
The expected output is no internal error. Or something more clear about what's wrong. (isn't super-weird that phpstan is loading the local dependencies instead of its own?)
Did PHPStan help you today? Did it make you happy in any way?
I'm not sure phpstan makes me happy, most part of the time it makes my life harder 😄 . But I'm really glad it avoids so much errors in production. 🫶 Thanks
The text was updated successfully, but these errors were encountered: