From 2344e7555465cf68f3e97339ca13ec7f21407851 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 2 Jun 2022 07:24:02 +0000 Subject: [PATCH] Updated Rector to commit d3a921010a768f1220ebee8a2c642fdd5876891d https://github.com/rectorphp/rector-src/commit/d3a921010a768f1220ebee8a2c642fdd5876891d [Php74] Skip nullable mixed on Php 8.0 feature enabled on TypedPropertyRector (#2414) --- .../Php74/Rector/Property/TypedPropertyRector.php | 10 +++++++--- src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 14 +++++++------- vendor/composer/autoload_static.php | 8 ++++---- vendor/scoper-autoload.php | 10 +++++----- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/rules/Php74/Rector/Property/TypedPropertyRector.php b/rules/Php74/Rector/Property/TypedPropertyRector.php index 06b39eaf4f7..756a826f36c 100644 --- a/rules/Php74/Rector/Property/TypedPropertyRector.php +++ b/rules/Php74/Rector/Property/TypedPropertyRector.php @@ -6,6 +6,7 @@ namespace Rector\Php74\Rector\Property; use PhpParser\Node; use PhpParser\Node\ComplexType; use PhpParser\Node\Name; +use PhpParser\Node\NullableType; use PhpParser\Node\Stmt\ClassLike; use PhpParser\Node\Stmt\Property; use PHPStan\Analyser\Scope; @@ -177,14 +178,17 @@ CODE_SAMPLE if (!$node instanceof \PhpParser\Node) { return \true; } + if ($node instanceof \PhpParser\Node\NullableType && $this->isName($node->type, 'mixed')) { + return \true; + } // false positive if (!$node instanceof \PhpParser\Node\Name) { return $this->vendorLockResolver->isPropertyTypeChangeVendorLockedIn($property); } - if (!$this->isName($node, 'mixed')) { - return $this->vendorLockResolver->isPropertyTypeChangeVendorLockedIn($property); + if ($this->isName($node, 'mixed')) { + return \true; } - return \true; + return $this->vendorLockResolver->isPropertyTypeChangeVendorLockedIn($property); } private function removeDefaultValueForDoctrineCollection(\PhpParser\Node\Stmt\Property $property, \PHPStan\Type\Type $propertyType) : void { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 83772ac40ce..f62db7abbdd 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = '9187ff04308cfeccde7d875117b0546b3e764fb5'; + public const PACKAGE_VERSION = 'd3a921010a768f1220ebee8a2c642fdd5876891d'; /** * @var string */ - public const RELEASE_DATE = '2022-06-02 09:18:09'; + public const RELEASE_DATE = '2022-06-02 09:18:53'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 0754e71bde9..449d1ff52b8 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf::getLoader(); +return ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 326fdfdf0cc..c9fb65a7b5c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf +class ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit537cdbd133bcef469febdd8bae822dbf::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit537cdbd133bcef469febdd8bae822dbf::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire537cdbd133bcef469febdd8bae822dbf($fileIdentifier, $file); + composerRequire0a36232315aecc79ab3b8f1f069516fb($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf * @param string $file * @return void */ -function composerRequire537cdbd133bcef469febdd8bae822dbf($fileIdentifier, $file) +function composerRequire0a36232315aecc79ab3b8f1f069516fb($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 025098c713a..9e776f982f7 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit537cdbd133bcef469febdd8bae822dbf +class ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -3786,9 +3786,9 @@ class ComposerStaticInit537cdbd133bcef469febdd8bae822dbf public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit537cdbd133bcef469febdd8bae822dbf::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit537cdbd133bcef469febdd8bae822dbf::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit537cdbd133bcef469febdd8bae822dbf::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit0a36232315aecc79ab3b8f1f069516fb::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index c39a8bc58bf..7c42b2f95cd 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20220602\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf', false) && !interface_exists('ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf', false) && !trait_exists('ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf', false)) { - spl_autoload_call('RectorPrefix20220602\ComposerAutoloaderInit537cdbd133bcef469febdd8bae822dbf'); +if (!class_exists('ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb', false) && !interface_exists('ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb', false) && !trait_exists('ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb', false)) { + spl_autoload_call('RectorPrefix20220602\ComposerAutoloaderInit0a36232315aecc79ab3b8f1f069516fb'); } if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { spl_autoload_call('RectorPrefix20220602\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -59,9 +59,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20220602\print_node(...func_get_args()); } } -if (!function_exists('composerRequire537cdbd133bcef469febdd8bae822dbf')) { - function composerRequire537cdbd133bcef469febdd8bae822dbf() { - return \RectorPrefix20220602\composerRequire537cdbd133bcef469febdd8bae822dbf(...func_get_args()); +if (!function_exists('composerRequire0a36232315aecc79ab3b8f1f069516fb')) { + function composerRequire0a36232315aecc79ab3b8f1f069516fb() { + return \RectorPrefix20220602\composerRequire0a36232315aecc79ab3b8f1f069516fb(...func_get_args()); } } if (!function_exists('scanPath')) {