From 8d42e37dfd0f4ab7b6b8e158dff6d65de2e684d3 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 18 Aug 2023 09:06:56 +0000 Subject: [PATCH] Updated Rector to commit 00f736f054372cca311469fec02b46edd5159b9a https://github.com/rectorphp/rector-src/commit/00f736f054372cca311469fec02b46edd5159b9a Fix RenamePropertyToMatchTypeRector to skip Laravel collections and avoid accident rename (#4811) --- rules/Naming/Naming/PropertyNaming.php | 11 ++++++++--- ...nTypeDeclarationBasedOnParentClassMethodRector.php | 1 - src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/rules/Naming/Naming/PropertyNaming.php b/rules/Naming/Naming/PropertyNaming.php index f08055e1118..95f4b8a5d38 100644 --- a/rules/Naming/Naming/PropertyNaming.php +++ b/rules/Naming/Naming/PropertyNaming.php @@ -71,9 +71,14 @@ final class PropertyNaming } public function getExpectedNameFromType(Type $type) : ?ExpectedName { - // keep doctrine collections untouched - if ($type instanceof ObjectType && $type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes()) { - return null; + // keep collections untouched + if ($type instanceof ObjectType) { + if ($type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes()) { + return null; + } + if ($type->isInstanceOf('Illuminate\\Support\\Collection')->yes()) { + return null; + } } $className = $this->resolveClassNameFromType($type); if (!\is_string($className)) { diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationBasedOnParentClassMethodRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationBasedOnParentClassMethodRector.php index 08444267a7e..f89af05a73c 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationBasedOnParentClassMethodRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationBasedOnParentClassMethodRector.php @@ -9,7 +9,6 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\ParametersAcceptorSelector; use PHPStan\Reflection\ParametersAcceptorWithPhpDocs; -use PHPStan\Reflection\Php\PhpMethodReflection; use PHPStan\Type\MixedType; use PHPStan\Type\ObjectType; use PHPStan\Type\Type; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 42c4112495a..038d34302ca 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 = '5363a676265cbe868f4ecc6bde8c6a99b213d028'; + public const PACKAGE_VERSION = '00f736f054372cca311469fec02b46edd5159b9a'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-08-17 17:14:55'; + public const RELEASE_DATE = '2023-08-18 09:03:55'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 46902352e26..91c4827c73a 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 ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331::getLoader(); +return ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index accdc02082e..9956f0cbfcc 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331 +class ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331 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__)); - spl_autoload_unregister(array('ComposerAutoloaderInit18213625cfe26e077a3b667c79f3c331', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitc8b2dd093133f142591cd1b2c46cb94e', 'loadClassLoader')); 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->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$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 c2eb0d9d54d..6d0f21675a4 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit18213625cfe26e077a3b667c79f3c331 +class ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -2639,9 +2639,9 @@ class ComposerStaticInit18213625cfe26e077a3b667c79f3c331 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit18213625cfe26e077a3b667c79f3c331::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitc8b2dd093133f142591cd1b2c46cb94e::$classMap; }, null, ClassLoader::class); }