Updated Rector to commit ebfb78242931b03c082ce5b2f018b84c6742373f

ebfb782429 Reduce double loop to set stmt_key on refresh process (#6619)
This commit is contained in:
Tomas Votruba 2024-12-20 05:48:10 +00:00
parent 79fb8fc282
commit e5dd70b750
3 changed files with 9 additions and 5 deletions

View File

@ -52,7 +52,9 @@ final class ChangedNodeScopeRefresher
$errorMessage = \sprintf('Node "%s" with is missing scope required for scope refresh', \get_class($node));
throw new ShouldNotHappenException($errorMessage);
}
\Rector\Application\NodeAttributeReIndexer::reIndexNodeAttributes($node);
// reindex stmt_key already covered on StmtKeyNodeVisitor on next processNodes()
// so set flag $reIndexStmtKey to false to avoid double loop
\Rector\Application\NodeAttributeReIndexer::reIndexNodeAttributes($node, \false);
$stmts = $this->resolveStmts($node);
$this->phpStanNodeScopeResolver->processNodes($stmts, $filePath, $mutatingScope);
}

View File

@ -38,9 +38,11 @@ final class NodeAttributeReIndexer
}
return $node;
}
public static function reIndexNodeAttributes(Node $node) : ?Node
public static function reIndexNodeAttributes(Node $node, bool $reIndexStmtKey = \true) : ?Node
{
self::reIndexStmtKeyNodeAttributes($node);
if ($reIndexStmtKey) {
self::reIndexStmtKeyNodeAttributes($node);
}
if ($node instanceof If_) {
$node->elseifs = \array_values($node->elseifs);
return $node;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'a72a02188ab22b7beeb94dd1ffda79bdfffd64c4';
public const PACKAGE_VERSION = 'ebfb78242931b03c082ce5b2f018b84c6742373f';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-20 07:14:41';
public const RELEASE_DATE = '2024-12-20 12:45:44';
/**
* @var int
*/