Updated Rector to commit 00f736f054372cca311469fec02b46edd5159b9a

00f736f054 Fix RenamePropertyToMatchTypeRector to skip Laravel collections and avoid accident rename (#4811)
This commit is contained in:
Tomas Votruba 2023-08-18 09:06:56 +00:00
parent 7ad16ccd68
commit 8d42e37dfd
6 changed files with 20 additions and 16 deletions

View File

@ -71,9 +71,14 @@ final class PropertyNaming
} }
public function getExpectedNameFromType(Type $type) : ?ExpectedName public function getExpectedNameFromType(Type $type) : ?ExpectedName
{ {
// keep doctrine collections untouched // keep collections untouched
if ($type instanceof ObjectType && $type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes()) { if ($type instanceof ObjectType) {
return null; if ($type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes()) {
return null;
}
if ($type->isInstanceOf('Illuminate\\Support\\Collection')->yes()) {
return null;
}
} }
$className = $this->resolveClassNameFromType($type); $className = $this->resolveClassNameFromType($type);
if (!\is_string($className)) { if (!\is_string($className)) {

View File

@ -9,7 +9,6 @@ use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector; use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs; use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Type\MixedType; use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType; use PHPStan\Type\ObjectType;
use PHPStan\Type\Type; use PHPStan\Type\Type;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '5363a676265cbe868f4ecc6bde8c6a99b213d028'; public const PACKAGE_VERSION = '00f736f054372cca311469fec02b46edd5159b9a';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2023-08-17 17:14:55'; public const RELEASE_DATE = '2023-08-18 09:03:55';
/** /**
* @var int * @var int
*/ */

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331 class ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e
{ {
private static $loader; private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit18213625cfe26e077a3b667c79f3c331::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::getInitializer($loader));
$loader->setClassMapAuthoritative(true); $loader->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$files; $filesToLoad = \Composer\Autoload\ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit18213625cfe26e077a3b667c79f3c331 class ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e
{ {
public static $files = array ( public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2639,9 +2639,9 @@ class ComposerStaticInit18213625cfe26e077a3b667c79f3c331
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$classMap; $loader->classMap = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }