Updated Rector to commit 107914ea0b9152a1651f25478a0785db4e96f5f5

107914ea0b [CodingStyle] Skip var ArrayDimFetch on SplitDoubleAssignRector (#3481)
This commit is contained in:
Tomas Votruba 2023-03-16 10:27:27 +00:00
parent bee2d189ab
commit 6ac3776e07
8 changed files with 27 additions and 19 deletions

View File

@ -5,6 +5,7 @@ namespace Rector\CodingStyle\Rector\Assign;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\CallLike;
use PhpParser\Node\Stmt\Expression;
@ -60,7 +61,11 @@ CODE_SAMPLE
return null;
}
$lastAssignValue = $this->resolveLastAssignExpr($firstAssign);
return $this->collectExpressions($firstAssign, $lastAssignValue);
$collectExpressions = $this->collectExpressions($firstAssign, $lastAssignValue);
if ($collectExpressions === []) {
return null;
}
return $collectExpressions;
}
/**
* @return Expression[]
@ -70,6 +75,9 @@ CODE_SAMPLE
/** @var Expression[] $expressions */
$expressions = [];
while ($assign instanceof Assign) {
if ($assign->var instanceof ArrayDimFetch) {
return [];
}
$expressions[] = new Expression(new Assign($assign->var, $expr));
// CallLike check need to be after first fill Expression
// so use existing variable defined to avoid repetitive call

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'c240c69f45c29685eeace5ad0737ef049dff5211';
public const PACKAGE_VERSION = '107914ea0b9152a1651f25478a0785db4e96f5f5';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-03-14 05:27:04';
public const RELEASE_DATE = '2023-03-16 11:21:18';
/**
* @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 ComposerAutoloaderInitabddcf2c38c6b8af19139a50b22312e7::getLoader();
return ComposerAutoloaderInit835b3bb1d14c69d30716442b5000452d::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitabddcf2c38c6b8af19139a50b22312e7
class ComposerAutoloaderInit835b3bb1d14c69d30716442b5000452d
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitabddcf2c38c6b8af19139a50b22312e7
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitabddcf2c38c6b8af19139a50b22312e7', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit835b3bb1d14c69d30716442b5000452d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitabddcf2c38c6b8af19139a50b22312e7', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit835b3bb1d14c69d30716442b5000452d', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit835b3bb1d14c69d30716442b5000452d::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit835b3bb1d14c69d30716442b5000452d::$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 ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7
class ComposerStaticInit835b3bb1d14c69d30716442b5000452d
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3127,9 +3127,9 @@ class ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitabddcf2c38c6b8af19139a50b22312e7::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit835b3bb1d14c69d30716442b5000452d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit835b3bb1d14c69d30716442b5000452d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit835b3bb1d14c69d30716442b5000452d::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2125,12 +2125,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "6a67780b138e10d3ab7939c9e68d964f66650d36"
"reference": "dcaf67f9e89f2c7cf2c16cecabbb4df7a7fb91bf"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/6a67780b138e10d3ab7939c9e68d964f66650d36",
"reference": "6a67780b138e10d3ab7939c9e68d964f66650d36",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/dcaf67f9e89f2c7cf2c16cecabbb4df7a7fb91bf",
"reference": "dcaf67f9e89f2c7cf2c16cecabbb4df7a7fb91bf",
"shasum": ""
},
"require": {
@ -2159,7 +2159,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-03-14T10:14:09+00:00",
"time": "2023-03-14T10:54:41+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5fe59e9'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b7d8492'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main dfeb67c'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6a67780'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5fe59e9'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b7d8492'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main dfeb67c'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main dcaf67f'));
private function __construct()
{
}