-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Valinor 1.14.2 breaks backwards compatibility with PHPStan 1.x as extension #588
Comments
Right, sorry for that! I'll take a look so that the PHPStan extension works with PHPStan v1 and v2. Feel free to open a PR if you have time. 😊 |
@eliashaeussler As you mention this is blocking for your project; for now you can make Composer ignore this update by specifying "^1.14,!=1.14.2" in your composer.json as version constraint. |
Hi @NanoSector @eliashaeussler this should be fixed by #590. Before merging, could you try these changes on your codebase? |
Hi @romm, as always – thank you very much for the very quick fix! Works on my end with PHPStan 1.12.15. |
@romm Thank you, that indeed does fix the issue, also with PHPStan 1.12.15! :) |
Thanks guys! Release coming up soon with this fix. |
Commit 9ef3cfb introduces an upgrade to PHPStan 2.x.
Because this targets dev dependencies, this seems like an innocent change isolated to this project, however this also means anything using the PHPStan extension alongside PHPStan 1.x will currently encounter crashes during analysis.
Specifically, the methods used to determine types differ between the two major versions, the case we are hitting is 9ef3cfb#diff-ea9b5457f00993b9839f70d8d1a8b84f01f6ec646dfc73329ca5951df29b241aR61
This method is in some cases called
isClassStringType
in PHPStan 1.x so an undefined method error is thrown. In other cases this value returns a boolean, so theyes()
call also throws an undefined method error.This probably should have been released in a minor version instead of a patch version as this currently is a backwards compatibility break.
The text was updated successfully, but these errors were encountered: