mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 0c2b4f7732587b7ed55b3279a7807c09162ad010
0c2b4f7732
[Core] Set compatible with latest BetterReflection usage to handle assert( > 0) notice (#2978)
This commit is contained in:
parent
00c000da8f
commit
07746f72b0
@ -17,12 +17,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'd6b984564dc6ea97b294e54ebb4bfdad76877063';
|
||||
public const PACKAGE_VERSION = '0c2b4f7732587b7ed55b3279a7807c09162ad010';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-10-05 17:28:42';
|
||||
public const RELEASE_DATE = '2022-10-05 21:09:39';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -8,9 +8,7 @@ use PHPStan\BetterReflection\Identifier\Identifier;
|
||||
use PHPStan\BetterReflection\Identifier\IdentifierType;
|
||||
use PHPStan\BetterReflection\Reflection\Reflection;
|
||||
use PHPStan\BetterReflection\Reflection\ReflectionClass;
|
||||
use PHPStan\BetterReflection\Reflector\ClassReflector;
|
||||
use PHPStan\BetterReflection\Reflector\Reflector;
|
||||
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
|
||||
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
|
||||
use Rector\Core\Configuration\RenamedClassesDataCollector;
|
||||
/**
|
||||
@ -37,7 +35,6 @@ final class RenamedClassesSourceLocator implements SourceLocator
|
||||
if ($identifierName !== $oldClass) {
|
||||
continue;
|
||||
}
|
||||
// inspired at https://github.com/phpstan/phpstan-src/blob/a9dd9af959fb0c1e0a09d4850f78e05e8dff3d91/src/Reflection/BetterReflection/BetterReflectionProvider.php#L220-L225
|
||||
return $this->createFakeReflectionClassFromClassName($oldClass);
|
||||
}
|
||||
return null;
|
||||
@ -53,8 +50,6 @@ final class RenamedClassesSourceLocator implements SourceLocator
|
||||
{
|
||||
$classBuilder = new Class_($oldClass);
|
||||
$class = $classBuilder->getNode();
|
||||
$fakeLocatedSource = new LocatedSource('virtual', null);
|
||||
$classReflector = new ClassReflector($this);
|
||||
return ReflectionClass::createFromNode($classReflector, $class, $fakeLocatedSource);
|
||||
return ReflectionClass::createFromInstance($class);
|
||||
}
|
||||
}
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41::getLoader();
|
||||
return ComposerAutoloaderInite61f97ffaa20fa7dbd2d815f3d528466::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41
|
||||
class ComposerAutoloaderInite61f97ffaa20fa7dbd2d815f3d528466
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInite61f97ffaa20fa7dbd2d815f3d528466', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite61f97ffaa20fa7dbd2d815f3d528466', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire08796dfb633ef1ce0f74b9295ae43d41($fileIdentifier, $file);
|
||||
composerRequiree61f97ffaa20fa7dbd2d815f3d528466($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInit08796dfb633ef1ce0f74b9295ae43d41
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire08796dfb633ef1ce0f74b9295ae43d41($fileIdentifier, $file)
|
||||
function composerRequiree61f97ffaa20fa7dbd2d815f3d528466($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41
|
||||
class ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3087,9 +3087,9 @@ class ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit08796dfb633ef1ce0f74b9295ae43d41::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite61f97ffaa20fa7dbd2d815f3d528466::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user