Updated Rector to commit 99e5c8add0

99e5c8add0 [Stubs] Fix Regression Scoped autoload introduced in 0.11.38 (#484)
This commit is contained in:
Tomas Votruba 2021-07-22 17:14:05 +00:00
parent 918f365f5d
commit 2601c9a904
6 changed files with 36 additions and 23 deletions

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '17db5110437df6b5610ff1090d9519372bae8e9b';
public const PACKAGE_VERSION = '99e5c8add071694fc78f315eaecf42c5edd74aaa';
/**
* @var string
*/
public const RELEASE_DATE = '2021-07-22 18:54:48';
public const RELEASE_DATE = '2021-07-22 19:05:10';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210722\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -41,10 +41,8 @@ final class PHPStanStubLoader
continue;
}
foreach (self::STUBS as $stub) {
// this is to handle phpstan's stubs got from phpstan-extracted instead of the .phar.
$path = \sprintf('%s/phpstan/phpstan-extracted/stubs/runtime/%s', $vendorPath, $stub);
$isExists = \file_exists($path);
if (!$isExists) {
$path = $this->getStubPath($vendorPath, $stub);
if ($path === null) {
continue 2;
}
require_once $path;
@ -54,4 +52,19 @@ final class PHPStanStubLoader
break;
}
}
private function getStubPath(string $vendorPath, string $stub) : ?string
{
// @todo: need to be switched when phpstan-extracted used after scoped php 7.0 works
$path = \sprintf('phar://%s/phpstan/phpstan/phpstan.phar/stubs/runtime/%s', $vendorPath, $stub);
$isExists = \file_exists($path);
if (!$isExists) {
// this is to handle phpstan's stubs got from phpstan-extracted instead of the .phar when exists after scoped php 7.0 applied
$path = \sprintf('%s/phpstan/phpstan-extracted/stubs/runtime/%s', $vendorPath, $stub);
$isExists = \file_exists($path);
}
if ($isExists) {
return $path;
}
return null;
}
}

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb
class ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35', '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\ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit316284f2a17b04ff051b9306f6349e35::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit316284f2a17b04ff051b9306f6349e35::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirecf3d96a0d2e03191659743960fa3e1cb($fileIdentifier, $file);
composerRequire316284f2a17b04ff051b9306f6349e35($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequirecf3d96a0d2e03191659743960fa3e1cb($fileIdentifier, $file)
function composerRequire316284f2a17b04ff051b9306f6349e35($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb
class ComposerStaticInit316284f2a17b04ff051b9306f6349e35
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3844,9 +3844,9 @@ class ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcf3d96a0d2e03191659743960fa3e1cb::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit316284f2a17b04ff051b9306f6349e35::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit316284f2a17b04ff051b9306f6349e35::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit316284f2a17b04ff051b9306f6349e35::$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('RectorPrefix20210722\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb', false) && !interface_exists('ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb', false) && !trait_exists('ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb', false)) {
spl_autoload_call('RectorPrefix20210722\ComposerAutoloaderInitcf3d96a0d2e03191659743960fa3e1cb');
if (!class_exists('ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35', false) && !interface_exists('ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35', false) && !trait_exists('ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35', false)) {
spl_autoload_call('RectorPrefix20210722\ComposerAutoloaderInit316284f2a17b04ff051b9306f6349e35');
}
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
spl_autoload_call('RectorPrefix20210722\Doctrine\Inflector\Inflector');
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20210722\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirecf3d96a0d2e03191659743960fa3e1cb')) {
function composerRequirecf3d96a0d2e03191659743960fa3e1cb() {
return \RectorPrefix20210722\composerRequirecf3d96a0d2e03191659743960fa3e1cb(...func_get_args());
if (!function_exists('composerRequire316284f2a17b04ff051b9306f6349e35')) {
function composerRequire316284f2a17b04ff051b9306f6349e35() {
return \RectorPrefix20210722\composerRequire316284f2a17b04ff051b9306f6349e35(...func_get_args());
}
}
if (!function_exists('parseArgs')) {