Updated Rector to commit 55bde86033d704228a71c83b6b4d597d8bc6d350

55bde86033 [Performance] Reduce possible re-create Scope on ExprScopeFromStmtNodeVisitor (#4853)
This commit is contained in:
Tomas Votruba 2023-08-25 17:57:39 +00:00
parent e44653703c
commit 909b93c7f2
8 changed files with 21 additions and 32 deletions

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -1812,12 +1812,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "7f70e9457c61037ac1f02e17a66335675ebcaf99"
"reference": "a3c31708a200b4da7e28e3525a162a38c4af4950"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/7f70e9457c61037ac1f02e17a66335675ebcaf99",
"reference": "7f70e9457c61037ac1f02e17a66335675ebcaf99",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/a3c31708a200b4da7e28e3525a162a38c4af4950",
"reference": "a3c31708a200b4da7e28e3525a162a38c4af4950",
"shasum": ""
},
"require": {
@ -1843,7 +1843,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-08-25T15:54:37+00:00",
"time": "2023-08-25T17:51:45+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 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 7f70e94'), '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 a3c3170'), '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()
{
}

View File

@ -58,10 +58,10 @@ CODE_SAMPLE
public function refactor(Node $node) : ?Node
{
foreach ($node->getMethods() as $classMethod) {
if (!$this->nodeNameResolver->isName($classMethod, 'hasChildren')) {
if (!isset($classMethod->params[0])) {
continue;
}
if (!isset($classMethod->params[0])) {
if (!$this->nodeNameResolver->isName($classMethod, 'hasChildren')) {
continue;
}
$ancestorClassNames = $this->familyRelationsAnalyzer->getClassLikeAncestorNames($node);

View File

@ -4,8 +4,8 @@ declare (strict_types=1);
namespace Rector\DowngradePhp80\Rector\Property;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\Property;
use PHPStan\Type\MixedType;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeManipulator\PropertyDecorator;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@ -55,25 +55,14 @@ CODE_SAMPLE
*/
public function refactor(Node $node) : ?Node
{
if ($node->type === null) {
if (!$node->type instanceof Identifier) {
return null;
}
if ($this->shouldSkip($node)) {
if ($node->type->toString() !== 'mixed') {
return null;
}
$this->PropertyDecorator->decorateWithDocBlock($node, $node->type);
$node->type = null;
return $node;
}
private function shouldSkip(Property $property) : bool
{
if ($property->type === null) {
return \true;
}
$type = $this->staticTypeMapper->mapPhpParserNodePHPStanType($property->type);
if (!$type instanceof MixedType) {
return \true;
}
return !$type->isExplicitMixed();
}
}