Updated Rector to commit a354edaa5547f63a3407f3155e696f2709f4231a

a354edaa55 [DeadCode][Php56] Handle infinite loop on RemoveUnusedVariableAssignRector+AddDefaultValueForUndefinedVariableRector take 2 (#3941)
This commit is contained in:
Tomas Votruba 2023-05-24 02:18:56 +00:00
parent f7fccae5ba
commit f45c2e9273
5 changed files with 26 additions and 14 deletions

View File

@ -97,8 +97,16 @@ final class ChangedNodeScopeRefresher
}
public function reIndexNodeAttributes(Node $node) : void
{
if (($node instanceof ClassLike || $node instanceof StmtsAwareInterface || $node instanceof Declare_) && $node->stmts !== null) {
$node->stmts = \array_values($node->stmts);
if ($this->hasArrayStmtsNode($node)) {
/**
* @var StmtsAwareInterface|ClassLike|Declare_ $node
* @var Stmt[] $stmts
*/
$stmts = $node->stmts;
$node->stmts = \array_values($stmts);
foreach ($node->stmts as $key => $stmt) {
$stmt->setAttribute(AttributeKey::STMT_KEY, $key);
}
}
if ($node instanceof FunctionLike) {
/** @var ClassMethod|Function_|Closure $node */
@ -121,6 +129,10 @@ final class ChangedNodeScopeRefresher
$node->cases = \array_values($node->cases);
}
}
private function hasArrayStmtsNode(Node $node) : bool
{
return ($node instanceof ClassLike || $node instanceof StmtsAwareInterface || $node instanceof Declare_) && $node->stmts !== null;
}
/**
* @return Stmt[]
*/

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'e04e51c25d95e3b2133adca5f01f8e7e002534af';
public const PACKAGE_VERSION = 'a354edaa5547f63a3407f3155e696f2709f4231a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-05-23 22:10:19';
public const RELEASE_DATE = '2023-05-24 02:14:43';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd1d2061199a1a4da697a421683536958::getLoader();
return ComposerAutoloaderInit8645208c4675e0356a63f1c4dca57069::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitd1d2061199a1a4da697a421683536958
class ComposerAutoloaderInit8645208c4675e0356a63f1c4dca57069
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitd1d2061199a1a4da697a421683536958
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitd1d2061199a1a4da697a421683536958', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit8645208c4675e0356a63f1c4dca57069', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitd1d2061199a1a4da697a421683536958', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit8645208c4675e0356a63f1c4dca57069', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd1d2061199a1a4da697a421683536958::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit8645208c4675e0356a63f1c4dca57069::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitd1d2061199a1a4da697a421683536958::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit8645208c4675e0356a63f1c4dca57069::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitd1d2061199a1a4da697a421683536958
class ComposerStaticInit8645208c4675e0356a63f1c4dca57069
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3106,9 +3106,9 @@ class ComposerStaticInitd1d2061199a1a4da697a421683536958
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd1d2061199a1a4da697a421683536958::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd1d2061199a1a4da697a421683536958::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd1d2061199a1a4da697a421683536958::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8645208c4675e0356a63f1c4dca57069::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8645208c4675e0356a63f1c4dca57069::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8645208c4675e0356a63f1c4dca57069::$classMap;
}, null, ClassLoader::class);
}