mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
Updated Rector to commit ea2ee121e0b6388fdcda0125f7dca941a44edc3a
ea2ee121e0
[Reflection] Remove parent lookup on ReflectionResolver (#4169)
This commit is contained in:
parent
01557664e6
commit
971a0d2b75
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'd541d1a77e5e140bf12d4b71c9c9f98a3852a366';
|
||||
public const PACKAGE_VERSION = 'ea2ee121e0b6388fdcda0125f7dca941a44edc3a';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-11 00:36:07';
|
||||
public const RELEASE_DATE = '2023-06-11 12:42:01';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ final class RectorKernel
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private const CACHE_KEY = 'v89';
|
||||
private const CACHE_KEY = 'v90';
|
||||
/**
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface|null
|
||||
*/
|
||||
|
@ -25,7 +25,6 @@ use PHPStan\Type\TypeWithClassName;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\NodeAnalyzer\ClassAnalyzer;
|
||||
use Rector\Core\PhpParser\AstResolver;
|
||||
use Rector\Core\PhpParser\Node\BetterNodeFinder;
|
||||
use Rector\Core\PHPStan\Reflection\TypeToCallReflectionResolver\TypeToCallReflectionResolverRegistry;
|
||||
use Rector\Core\ValueObject\MethodName;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
@ -40,11 +39,6 @@ final class ReflectionResolver
|
||||
* @var \PHPStan\Reflection\ReflectionProvider
|
||||
*/
|
||||
private $reflectionProvider;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
|
||||
*/
|
||||
private $betterNodeFinder;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeTypeResolver\NodeTypeResolver
|
||||
@ -69,10 +63,9 @@ final class ReflectionResolver
|
||||
* @var \Rector\Core\PhpParser\AstResolver
|
||||
*/
|
||||
private $astResolver;
|
||||
public function __construct(ReflectionProvider $reflectionProvider, BetterNodeFinder $betterNodeFinder, NodeTypeResolver $nodeTypeResolver, NodeNameResolver $nodeNameResolver, TypeToCallReflectionResolverRegistry $typeToCallReflectionResolverRegistry, ClassAnalyzer $classAnalyzer)
|
||||
public function __construct(ReflectionProvider $reflectionProvider, NodeTypeResolver $nodeTypeResolver, NodeNameResolver $nodeNameResolver, TypeToCallReflectionResolverRegistry $typeToCallReflectionResolverRegistry, ClassAnalyzer $classAnalyzer)
|
||||
{
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
$this->betterNodeFinder = $betterNodeFinder;
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
$this->typeToCallReflectionResolverRegistry = $typeToCallReflectionResolverRegistry;
|
||||
@ -201,14 +194,11 @@ final class ReflectionResolver
|
||||
}
|
||||
public function resolveMethodReflectionFromClassMethod(ClassMethod $classMethod) : ?MethodReflection
|
||||
{
|
||||
$classLike = $this->betterNodeFinder->findParentType($classMethod, ClassLike::class);
|
||||
if (!$classLike instanceof ClassLike) {
|
||||
return null;
|
||||
}
|
||||
$className = $this->nodeNameResolver->getName($classLike);
|
||||
if (!\is_string($className)) {
|
||||
$classReflection = $this->resolveClassReflection($classMethod);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
$className = $classReflection->getName();
|
||||
$methodName = $this->nodeNameResolver->getName($classMethod);
|
||||
$scope = $classMethod->getAttribute(AttributeKey::SCOPE);
|
||||
return $this->resolveMethodReflection($className, $methodName, $scope);
|
||||
|
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 ComposerAutoloaderInitd3d078f7b7ac5bab00694b4144be9d9b::getLoader();
|
||||
return ComposerAutoloaderInit2a46dd31cd0649b8ab5689ec3d5eed81::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 ComposerAutoloaderInitd3d078f7b7ac5bab00694b4144be9d9b
|
||||
class ComposerAutoloaderInit2a46dd31cd0649b8ab5689ec3d5eed81
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitd3d078f7b7ac5bab00694b4144be9d9b
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd3d078f7b7ac5bab00694b4144be9d9b', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2a46dd31cd0649b8ab5689ec3d5eed81', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd3d078f7b7ac5bab00694b4144be9d9b', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2a46dd31cd0649b8ab5689ec3d5eed81', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81::$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 ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b
|
||||
class ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3127,9 +3127,9 @@ class ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd3d078f7b7ac5bab00694b4144be9d9b::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2a46dd31cd0649b8ab5689ec3d5eed81::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user