Updated Rector to commit fb92953a4ecd43c6dfb2de9dd1b7c32a74c552d8

fb92953a4e [Php80][Php81] Handle crash on combine AnnotationToAttributeRector + FirstClassCallableRector (#6767)
This commit is contained in:
Tomas Votruba 2025-03-05 12:04:52 +00:00
parent d587dda3fe
commit 5baa4004e9
3 changed files with 9 additions and 4 deletions

View File

@ -11,6 +11,7 @@ use PhpParser\Node\DeclareItem;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Param;
use PhpParser\Node\PropertyItem;
use PhpParser\Node\StaticVar;
use PhpParser\Node\Stmt;
@ -90,6 +91,11 @@ final class ChangedNodeScopeRefresher
if ($node instanceof UseItem) {
return [new Use_([$node])];
}
if ($node instanceof Param) {
$closure = new Closure();
$closure->params[] = $node;
return [new Expression($closure)];
}
$errorMessage = \sprintf('Complete parent node of "%s" be a stmt.', \get_class($node));
throw new ShouldNotHappenException($errorMessage);
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'e79b0d5e38c54c9dced027bfcdc00085e18e6b68';
public const PACKAGE_VERSION = 'fb92953a4ecd43c6dfb2de9dd1b7c32a74c552d8';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-03-04 22:21:30';
public const RELEASE_DATE = '2025-03-05 19:02:20';
/**
* @var int
*/

View File

@ -9,13 +9,12 @@ use PhpParser\Node\Attribute;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Param;
final class ScopeAnalyzer
{
/**
* @var array<class-string<Node>>
*/
private const NON_REFRESHABLE_NODES = [Name::class, Identifier::class, Param::class, Arg::class, Variable::class, Attribute::class];
private const NON_REFRESHABLE_NODES = [Name::class, Identifier::class, Arg::class, Variable::class, Attribute::class];
public function isRefreshable(Node $node) : bool
{
foreach (self::NON_REFRESHABLE_NODES as $noScopeNode) {