Updated Rector to commit d3a921010a768f1220ebee8a2c642fdd5876891d

d3a921010a [Php74] Skip nullable mixed on Php 8.0 feature enabled on TypedPropertyRector (#2414)
This commit is contained in:
Tomas Votruba 2022-06-02 07:24:02 +00:00
parent 02c0f07aa0
commit 2344e75554
6 changed files with 26 additions and 22 deletions

View File

@ -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
{

View File

@ -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
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -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;

View File

@ -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);
}

View File

@ -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')) {