mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
Updated Rector to commit f77e355f95de5ca8ac256bc975418ba498e72a57
f77e355f95
Use instanceof check on ClassReflection resolve (#4547)
This commit is contained in:
parent
2a46c820ee
commit
2056f7b2b8
@ -15,6 +15,7 @@ use PhpParser\Node\Stmt\Property;
|
||||
use PhpParser\Node\UnionType;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\TypeCombinator;
|
||||
use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger;
|
||||
@ -166,10 +167,10 @@ CODE_SAMPLE
|
||||
if ($this->shouldSkipParam($param)) {
|
||||
continue;
|
||||
}
|
||||
if ($classReflection === null) {
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
|
||||
}
|
||||
if ($classReflection === null) {
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->makePropertyPromotionGuard->isLegal($node, $classReflection, $property, $param, $this->inlinePublic)) {
|
||||
|
@ -9,6 +9,7 @@ use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\TypeCombinator;
|
||||
use PHPStan\Type\UnionType;
|
||||
@ -118,10 +119,10 @@ CODE_SAMPLE
|
||||
if (!$this->isDefaultExprTypeCompatible($property, $getterSetterPropertyType)) {
|
||||
continue;
|
||||
}
|
||||
if ($classReflection === null) {
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
|
||||
}
|
||||
if ($classReflection === null) {
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->makePropertyTypedGuard->isLegal($property, $classReflection, \false)) {
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '141a94aa49a3f64e78e3dd2f2a4b1d91de425b8b';
|
||||
public const PACKAGE_VERSION = 'f77e355f95de5ca8ac256bc975418ba498e72a57';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-20 07:20:17';
|
||||
public const RELEASE_DATE = '2023-07-20 07:24:56';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit99187f9671ed6291ffb5ad29a6b50ae0::getLoader();
|
||||
return ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d::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 ComposerAutoloaderInit99187f9671ed6291ffb5ad29a6b50ae0
|
||||
class ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit99187f9671ed6291ffb5ad29a6b50ae0
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit99187f9671ed6291ffb5ad29a6b50ae0', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit99187f9671ed6291ffb5ad29a6b50ae0', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0088ec8d10e5e688125c7ee39ebb088d', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$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 ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0
|
||||
class ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3023,9 +3023,9 @@ class ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit99187f9671ed6291ffb5ad29a6b50ae0::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0088ec8d10e5e688125c7ee39ebb088d::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user