mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
Updated Rector to commit f64cb7b3f8467fe5e6509f0651017a6dabc1fd47
f64cb7b3f8
Revert "Pin react/socket to 1.13 (#4855)" (#4856)
This commit is contained in:
parent
0728ba3ce0
commit
3982c504e9
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '55bde86033d704228a71c83b6b4d597d8bc6d350';
|
||||
public const PACKAGE_VERSION = 'f64cb7b3f8467fe5e6509f0651017a6dabc1fd47';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-08-25 23:51:22';
|
||||
public const RELEASE_DATE = '2023-08-26 08:39:06';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit953bff4e5e3b86f28936e3baabaa2e98::getLoader();
|
||||
return ComposerAutoloaderInitadaa5e5c04d5547f47a2cb68968f8e58::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit953bff4e5e3b86f28936e3baabaa2e98
|
||||
class ComposerAutoloaderInitadaa5e5c04d5547f47a2cb68968f8e58
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit953bff4e5e3b86f28936e3baabaa2e98
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit953bff4e5e3b86f28936e3baabaa2e98', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitadaa5e5c04d5547f47a2cb68968f8e58', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit953bff4e5e3b86f28936e3baabaa2e98', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitadaa5e5c04d5547f47a2cb68968f8e58', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98
|
||||
class ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -2608,9 +2608,9 @@ class ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit953bff4e5e3b86f28936e3baabaa2e98::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitadaa5e5c04d5547f47a2cb68968f8e58::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -1812,12 +1812,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
||||
"reference": "02d50e26cde966f0e6a8b7c45de287d916e75a14"
|
||||
"reference": "6fbdefd4bc48ab26033932aad45b0d7846120efa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/02d50e26cde966f0e6a8b7c45de287d916e75a14",
|
||||
"reference": "02d50e26cde966f0e6a8b7c45de287d916e75a14",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/6fbdefd4bc48ab26033932aad45b0d7846120efa",
|
||||
"reference": "6fbdefd4bc48ab26033932aad45b0d7846120efa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1843,7 +1843,7 @@
|
||||
"tomasvotruba\/type-coverage": "^0.2",
|
||||
"tomasvotruba\/unused-public": "^0.1"
|
||||
},
|
||||
"time": "2023-08-26T05:21:21+00:00",
|
||||
"time": "2023-08-26T07:12:27+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -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 c0ab738'), '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 02d50e2'), '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 e6dd6a0'), '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 ef9424a'));
|
||||
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 c0ab738'), '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 6fbdefd'), '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 e6dd6a0'), '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 ef9424a'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ CODE_SAMPLE
|
||||
return null;
|
||||
}
|
||||
/** @var MutatingScope $scope */
|
||||
return $this->arrayMergeFromArraySpreadFactory->createFromArray($node, $scope, $this->file);
|
||||
return $this->arrayMergeFromArraySpreadFactory->createFromArray($node, $scope);
|
||||
}
|
||||
private function refactorUnderClassConst(ClassConst $classConst) : ?ClassConst
|
||||
{
|
||||
|
@ -61,6 +61,9 @@ CODE_SAMPLE
|
||||
if (!isset($classMethod->params[0])) {
|
||||
continue;
|
||||
}
|
||||
if ($classMethod->params[0]->type === null) {
|
||||
continue;
|
||||
}
|
||||
if (!$this->nodeNameResolver->isName($classMethod, 'hasChildren')) {
|
||||
continue;
|
||||
}
|
||||
@ -68,9 +71,6 @@ CODE_SAMPLE
|
||||
if (!\in_array('RecursiveDirectoryIterator', $ancestorClassNames, \true)) {
|
||||
continue;
|
||||
}
|
||||
if ($classMethod->params[0]->type === null) {
|
||||
continue;
|
||||
}
|
||||
$classMethod->params[0]->type = null;
|
||||
return $node;
|
||||
}
|
||||
|
@ -17,8 +17,6 @@ use PHPStan\Type\IterableType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\DowngradePhp81\NodeAnalyzer\ArraySpreadAnalyzer;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
final class ArrayMergeFromArraySpreadFactory
|
||||
@ -28,21 +26,12 @@ final class ArrayMergeFromArraySpreadFactory
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\DowngradePhp81\NodeAnalyzer\ArraySpreadAnalyzer
|
||||
*/
|
||||
private $arraySpreadAnalyzer;
|
||||
public function __construct(NodeNameResolver $nodeNameResolver, ArraySpreadAnalyzer $arraySpreadAnalyzer)
|
||||
public function __construct(NodeNameResolver $nodeNameResolver)
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
$this->arraySpreadAnalyzer = $arraySpreadAnalyzer;
|
||||
}
|
||||
public function createFromArray(Array_ $array, MutatingScope $mutatingScope, File $file) : ?Node
|
||||
public function createFromArray(Array_ $array, MutatingScope $mutatingScope) : ?Node
|
||||
{
|
||||
if (!$this->arraySpreadAnalyzer->isArrayWithUnpack($array)) {
|
||||
return null;
|
||||
}
|
||||
$newArrayItems = $this->disolveArrayItems($array);
|
||||
return $this->createArrayMergeFuncCall($newArrayItems, $mutatingScope);
|
||||
}
|
||||
|
@ -65,17 +65,17 @@ CODE_SAMPLE
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?Node
|
||||
{
|
||||
if (!$this->arraySpreadAnalyzer->isArrayWithUnpack($node)) {
|
||||
return null;
|
||||
}
|
||||
if ($this->shouldSkipArray($node)) {
|
||||
return null;
|
||||
}
|
||||
/** @var MutatingScope $scope */
|
||||
return $this->arrayMergeFromArraySpreadFactory->createFromArray($node, $scope, $this->file);
|
||||
return $this->arrayMergeFromArraySpreadFactory->createFromArray($node, $scope);
|
||||
}
|
||||
private function shouldSkipArray(Array_ $array) : bool
|
||||
{
|
||||
if (!$this->arraySpreadAnalyzer->isArrayWithUnpack($array)) {
|
||||
return \true;
|
||||
}
|
||||
foreach ($array->items as $item) {
|
||||
if (!$item instanceof ArrayItem) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user