From 8d0b148b3df6551a8d34d22f5ee742fb0c85cf1c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 10 Oct 2026 15:16:45 +0200 Subject: [PATCH] Restore shouldSkipCurrentNode guard in RectorRunner --- src/Rector/RectorRunner.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Rector/RectorRunner.php b/src/Rector/RectorRunner.php index 546e33991bf..e1f2cb4b872 100644 --- a/src/Rector/RectorRunner.php +++ b/src/Rector/RectorRunner.php @@ -63,6 +63,11 @@ public function run(RectorInterface $rector, Node $node): int|Node|null|array $filePath = $file->getFilePath(); + // node already changed by this rule in a previous pass → hard skip + if ($this->skipper->shouldSkipCurrentNode($rector::class, $node)) { + return null; + } + // class/path skip is configured for this rule and file: run the rule on a deep clone to learn // whether it would actually have changed anything. Only a skip that prevents a real change // counts as used; the original node is left untouched, so the file stays skipped either way.