Updated Rector to commit 74b90d35752d75433bc5fe5e6933bed8a1cb4dee

4e0e174435 Configuratoin provided type does not have to exists 74b90d3575 Merge pull request #1624 from rectorphp/tv-fix-optional-configuration-type
This commit is contained in:
Tomas Votruba 2022-01-04 15:24:24 +00:00
parent eacdb4cfeb
commit 72567779cf
6 changed files with 26 additions and 20 deletions

View File

@ -18,6 +18,7 @@ use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\NullableType;
use PhpParser\Node\Stmt\Class_;
use PHPStan\Analyser\Scope;
use PHPStan\Broker\ClassAutoloadingException;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\FloatType;
@ -136,7 +137,12 @@ final class NodeTypeResolver
$resolvedType = $resolvedType->getStaticObjectType();
}
if ($resolvedType instanceof \PHPStan\Type\ObjectType) {
return $this->resolveObjectType($resolvedType, $requiredObjectType);
try {
return $this->resolveObjectType($resolvedType, $requiredObjectType);
} catch (\PHPStan\Broker\ClassAutoloadingException $exception) {
// in some type checks, the provided type in rector.php configuration does not have to exists
return \false;
}
}
return $this->isMatchingUnionType($resolvedType, $requiredObjectType);
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '6903b4da5a6db826c25dd5d391f3be5416701ac4';
public const PACKAGE_VERSION = '74b90d35752d75433bc5fe5e6933bed8a1cb4dee';
/**
* @var string
*/
public const RELEASE_DATE = '2022-01-04 15:00:23';
public const RELEASE_DATE = '2022-01-04 16:12:19';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220104\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98::getLoader();
return ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98
class ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit03683e0f5b586c348362328b8083ff98::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit03683e0f5b586c348362328b8083ff98::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire03683e0f5b586c348362328b8083ff98($fileIdentifier, $file);
composerRequire6548ac26ebe6ed31fc495f1070c5150c($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98
* @param string $file
* @return void
*/
function composerRequire03683e0f5b586c348362328b8083ff98($fileIdentifier, $file)
function composerRequire6548ac26ebe6ed31fc495f1070c5150c($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 ComposerStaticInit03683e0f5b586c348362328b8083ff98
class ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3850,9 +3850,9 @@ class ComposerStaticInit03683e0f5b586c348362328b8083ff98
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit03683e0f5b586c348362328b8083ff98::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit03683e0f5b586c348362328b8083ff98::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit03683e0f5b586c348362328b8083ff98::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit6548ac26ebe6ed31fc495f1070c5150c::$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('RectorPrefix20220104\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98', false) && !interface_exists('ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98', false) && !trait_exists('ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98', false)) {
spl_autoload_call('RectorPrefix20220104\ComposerAutoloaderInit03683e0f5b586c348362328b8083ff98');
if (!class_exists('ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c', false) && !interface_exists('ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c', false) && !trait_exists('ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c', false)) {
spl_autoload_call('RectorPrefix20220104\ComposerAutoloaderInit6548ac26ebe6ed31fc495f1070c5150c');
}
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('RectorPrefix20220104\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -78,9 +78,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220104\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire03683e0f5b586c348362328b8083ff98')) {
function composerRequire03683e0f5b586c348362328b8083ff98() {
return \RectorPrefix20220104\composerRequire03683e0f5b586c348362328b8083ff98(...func_get_args());
if (!function_exists('composerRequire6548ac26ebe6ed31fc495f1070c5150c')) {
function composerRequire6548ac26ebe6ed31fc495f1070c5150c() {
return \RectorPrefix20220104\composerRequire6548ac26ebe6ed31fc495f1070c5150c(...func_get_args());
}
}
if (!function_exists('scanPath')) {