Skip to content

Commit 5f6cdb5

Browse files
committed
Updated Rector to commit 885ba026b944ca24983e705bf74281dc06df5664
rectorphp/rector-src@885ba02 [internal] Traverse DecoratingNodeVisitorInterface after scope filling on PHPStanNodeScopeResolver::processNodes() (#7729)
1 parent 1d70826 commit 5f6cdb5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '2c3d56518bf636d6d8bc18327cd11cd62384821c';
22+
public const PACKAGE_VERSION = '885ba026b944ca24983e705bf74281dc06df5664';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-12-07 00:49:54';
27+
public const RELEASE_DATE = '2025-12-07 12:11:20';
2828
/**
2929
* @var int
3030
*/

src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ public function processNodes(array $stmts, string $filePath, ?MutatingScope $for
171171
* @see vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:282
172172
*/
173173
Assert::allIsInstanceOf($stmts, Stmt::class);
174-
$this->nodeTraverser->traverse($stmts);
175174
$scope = $formerMutatingScope ?? $this->scopeFactory->createFromFile($filePath);
176175
$nodeCallback = function (Node $node, MutatingScope $mutatingScope) use (&$nodeCallback, $filePath): void {
177176
// the class reflection is resolved AFTER entering to class node
@@ -355,6 +354,9 @@ public function processNodes(array $stmts, string $filePath, ?MutatingScope $for
355354
// fallback to fill by found scope
356355
\Rector\NodeTypeResolver\PHPStan\Scope\RectorNodeScopeResolver::processNodes($stmts, $scope);
357356
}
357+
// use after scope filling so DecoratingNodeVisitorInterface instance can fetch the scope of target node
358+
// @see https://github.com/rectorphp/rector-src/pull/7721#discussion_r2595932460
359+
$this->nodeTraverser->traverse($stmts);
358360
return $stmts;
359361
}
360362
private function processYield(Yield_ $yield, MutatingScope $mutatingScope): void

0 commit comments

Comments
 (0)