diff --git a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index b54f2e7dd80..2b7c3a1cc32 100644 --- a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -105,7 +105,7 @@ CODE_SAMPLE if ($classMethod->getAttribute(self::HAS_SWAPPED_PARAMS, \false) === \true) { return null; } - $classMethodReflection = $this->reflectionResolver->resolveMethodReflectionFromClassMethod($classMethod); + $classMethodReflection = $this->reflectionResolver->resolveMethodReflectionFromClassMethod($classMethod, $scope); if (!$classMethodReflection instanceof MethodReflection) { return null; } diff --git a/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php b/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php index 295660e3f78..dff0b248da4 100644 --- a/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php +++ b/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php @@ -125,7 +125,7 @@ CODE_SAMPLE if ($this->shouldSkip($methodName, $className, $node, $scope)) { return null; } - if ($this->isInstantiable($className)) { + if ($this->isInstantiable($className, $scope)) { $new = new New_($node->class); return new MethodCall($new, $node->name, $node->args); } @@ -175,12 +175,12 @@ CODE_SAMPLE $parentClassName = $this->parentClassScopeResolver->resolveParentClassName($scope); return $className === $parentClassName; } - private function isInstantiable(string $className) : bool + private function isInstantiable(string $className, Scope $scope) : bool { if (!$this->reflectionProvider->hasClass($className)) { return \false; } - $methodReflection = $this->reflectionResolver->resolveMethodReflection($className, '__callStatic', null); + $methodReflection = $this->reflectionResolver->resolveMethodReflection($className, '__callStatic', $scope); if ($methodReflection instanceof MethodReflection) { return \false; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 8574464748c..f9d200a0d94 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'f77e355f95de5ca8ac256bc975418ba498e72a57'; + public const PACKAGE_VERSION = '0ff50c06d0c90ed0a678fd56261ab40b25f8b29f'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-07-20 07:24:56'; + public const RELEASE_DATE = '2023-07-20 14:39:16'; /** * @var int */ diff --git a/src/Reflection/ReflectionResolver.php b/src/Reflection/ReflectionResolver.php index 48dbf35c26f..6348fd43e93 100644 --- a/src/Reflection/ReflectionResolver.php +++ b/src/Reflection/ReflectionResolver.php @@ -192,15 +192,14 @@ final class ReflectionResolver } return $this->resolveFunctionReflectionFromFuncCall($call); } - public function resolveMethodReflectionFromClassMethod(ClassMethod $classMethod) : ?MethodReflection + public function resolveMethodReflectionFromClassMethod(ClassMethod $classMethod, Scope $scope) : ?MethodReflection { - $classReflection = $this->resolveClassReflection($classMethod); + $classReflection = $scope->getClassReflection(); 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); } public function resolveMethodReflectionFromNew(New_ $new) : ?MethodReflection diff --git a/vendor/autoload.php b/vendor/autoload.php index 9d3511f6b53..79c14e029af 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d::getLoader(); +return ComposerAutoloaderInit177a1ab00f34054189b1b5f702c32392::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 0bb7acfb945..0327f0b9b0e 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d +class ComposerAutoloaderInit177a1ab00f34054189b1b5f702c32392 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit177a1ab00f34054189b1b5f702c32392', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit177a1ab00f34054189b1b5f702c32392', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit177a1ab00f34054189b1b5f702c32392::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit177a1ab00f34054189b1b5f702c32392::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 348887983a7..9aa19435304 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d +class ComposerStaticInit177a1ab00f34054189b1b5f702c32392 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3023,9 +3023,9 @@ class ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit177a1ab00f34054189b1b5f702c32392::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit177a1ab00f34054189b1b5f702c32392::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit177a1ab00f34054189b1b5f702c32392::$classMap; }, null, ClassLoader::class); }