Skip to content

Commit 599c558

Browse files
authored
Restore shouldSkipCurrentNode guard in RectorRunner (#8591)
1 parent 300fbc1 commit 599c558

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/Rector/RectorRunner.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public function run(RectorInterface $rector, Node $node): int|Node|null|array
6363

6464
$filePath = $file->getFilePath();
6565

66+
// node already changed by this rule in a previous pass → hard skip
67+
if ($this->skipper->shouldSkipCurrentNode($rector::class, $node)) {
68+
return null;
69+
}
70+
6671
// class/path skip is configured for this rule and file: run the rule on a deep clone to learn
6772
// whether it would actually have changed anything. Only a skip that prevents a real change
6873
// counts as used; the original node is left untouched, so the file stays skipped either way.

0 commit comments

Comments
 (0)