Skip to content

[perf] Drop re-processing guard, iterate rules to a fixed point - #8679

Merged
TomasVotruba merged 2 commits into
mainfrom
tv-node-traverser-5
Oct 19, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
tv-node-traverser-5

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Removes the per-pass re-processing guard and lets the fixed-point loop do the work instead.

  • drop CreatedByRuleDecorator and its Skipper::shouldSkipCurrentNode() guard in RectorRunner - rules no longer hard-skip a node they already touched in an earlier pass
  • FileProcessor iterates rules to a fixed point, so a node changed by one rule is re-offered to the others until nothing changes
  • ChangedNodeScopeRefresher wraps Else_/ElseIf_ into an If_ before refresh - PHPStan only scopes those as part of an If_, so their body statements kept a valid scope across repeated passes

@TomasVotruba
TomasVotruba force-pushed the tv-node-traverser-5 branch 2 times, most recently from 6aa67f0 to 917b4df Compare October 16, 2026 20:02
@TomasVotruba
TomasVotruba marked this pull request as draft October 16, 2026 20:17
@TomasVotruba
TomasVotruba force-pushed the tv-node-traverser-5 branch 14 times, most recently from b2a147b to 84c44de Compare October 19, 2026 17:23
Remove CreatedByRuleDecorator and its per-pass guard in RectorRunner; FileProcessor now iterates rules to a fixed point, refreshing scope on re-processed class and else nodes so repeated passes keep a valid scope.
@TomasVotruba TomasVotruba changed the title tv node traverser 5 Drop re-processing guard, iterate rules to a fixed point Oct 19, 2026
@TomasVotruba TomasVotruba changed the title Drop re-processing guard, iterate rules to a fixed point [perf] Drop re-processing guard, iterate rules to a fixed point Oct 19, 2026
@TomasVotruba
TomasVotruba marked this pull request as ready for review October 19, 2026 19:24
@TomasVotruba
TomasVotruba merged commit 65d5dc5 into main Oct 19, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-node-traverser-5 branch October 19, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant