Bump to PHPStan ^2.2.6 and Fix its Container compatibility in RichParser - #8208
Conversation
|
Fixed 🎉 /cc @magicsunday @TomasVotruba this needs merge and release to fix test compat and test packages on I don't have merge access when CI is required.
|
|
Independent reproduction, plus a diagnosis of why the 5 red checks are not the patch's fault. ReproductionDownstream project (
All 11 failures are Rector rule tests ( We are currently capped at Why the 5 failing checks cannot pass yetNone of them exercise this PR's
So the failure is the very bug this PR fixes, arriving through the published artifact. It is circular: those jobs can only go green once a release carrying the fix exists, which cannot happen until this merges. Two ways to break the cycle
Happy to open a PR for either if it helps. |
|
@michaelmeneses this just need merge and new release :) |
|
Thank you 👌 |
|
Released 2.5.8 for it 👍 https://github.com/rectorphp/rector/releases/tag/2.5.8 |
phpstan/phpstan 2.2.6 removed the private $container property on RichParser that Rector's PHPStanContainerMemento accessed via reflection, crashing every rector run. Fixed upstream in rectorphp/rector-src#8208 and released as rector/rector 2.5.8.
phpstan/phpstan 2.2.6 removed the private $container property on RichParser that Rector's PHPStanContainerMemento accessed via reflection, crashing every rector run. Fixed upstream in rectorphp/rector-src#8208 and released as rector/rector 2.5.8.

Fixes rectorphp/rector#9824
Currently update to use phpstan 2.2.6 cause crash:
This PR try bump to PHPStan ^2.2.6 and Fix its Container compatibility in RichParser.
See crash
https://github.com/rectorphp/rector-src/actions/runs/30224923562/job/89853439240#step:6:9