Repository navigation
PHPStan 2.3.3 + remove stale workarounds - #8859
Merged
TomasVotruba merged 8 commits intoOct 27, 2026
Merged
TomasVotruba merged 8 commits into
TomasVotruba merged 8 commits into
Conversation
ondrejmirtes
force-pushed
the
phpstan-2.3.3-remove-stale-workarounds
branch
from
October 27, 2026 14:26
3a0aa45 to
d1da801
Compare
…ow point reaches since 2.3.3
…arrow function attributes since 2.3.3 Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
…ve return types as native since 2.3.3 Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
…copy, it is not deprecated Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
…rinter prints all its virtual nodes Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
…mic variable name itself Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
ondrejmirtes
force-pushed
the
phpstan-2.3.3-remove-stale-workarounds
branch
from
October 27, 2026 14:30
d1da801 to
96e95af
Compare
Contributor
Author
|
Everything green now 😊 |
samsonasik
approved these changes
Oct 27, 2026
Comment on lines
-361
to
-377
| // PHPStan does not process attributes of closures and arrow functions | ||
| if (($node instanceof Closure || $node instanceof ArrowFunction) && $node->attrGroups !== []) { | ||
| $this->processClosureAttributeGroups($node, $mutatingScope, $nodeCallback); | ||
| } | ||
| }; | ||
|
|
||
| try { | ||
| $this->nodeScopeResolverProcessNodes($stmts, $scope, $nodeCallback); | ||
| } catch (Error $error) { | ||
| if (! str_starts_with($error->getMessage(), 'Call to undefined method ' . Printer::class . '::pPHPStan_')) { | ||
| throw $error; | ||
| } | ||
|
|
||
| // nothing we can do more precise here as error printing from deep internal PHPStan Printer service with service injection we cannot reset | ||
| // in the middle of process | ||
| // fallback to fill by found scope | ||
| RectorNodeScopeResolver::processNodes($stmts, $scope); |
Member
There was a problem hiding this comment.
This section was so annoying, just came across it last week. Happy to see it gone 👏
Member
|
Just shipped, more awesomeness :) thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I did some work so that Rector needs to work around PHPStan deficiencies less 😊