Updated Rector to commit d23308fd3f

d23308fd3f [Scoped] Remove phpstan-extracted code check reference (#1265)
This commit is contained in:
Tomas Votruba 2021-11-18 09:09:10 +00:00
parent 5e0eef55a5
commit 0d4e55e30d
7 changed files with 19 additions and 33 deletions

View File

@ -24,17 +24,10 @@ use RectorPrefix20211118\Symplify\PackageBuilder\Reflection\PrivatesCaller;
// Require Composer autoload.php
$autoloadIncluder = new \RectorPrefix20211118\AutoloadIncluder();
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
// load extracted PHPStan with its own preload.php
$extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php';
if (\file_exists($extractedPhpstanAutoload)) {
require_once $extractedPhpstanAutoload;
}
if (\file_exists(__DIR__ . '/../preload.php') && \is_dir(__DIR__ . '/../vendor')) {
require_once __DIR__ . '/../preload.php';
}
require_once __DIR__ . '/../src/constants.php';
// pre-set for PHP 5.6/7.0 downgraded version
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/phpstan-autoload.php');
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php');
$autoloadIncluder->autoloadProjectAutoloaderFile();
$autoloadIncluder->autoloadFromCommandLine();
@ -100,7 +93,6 @@ final class AutoloadIncluder
}
public function loadIfExistsAndNotLoadedYet(string $filePath) : void
{
// the scoper-autoload.php is exists in phpstan-extracted/vendor/scoper-autoload.php, move the check in :
if (!\file_exists($filePath)) {
return;
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'c6473c6a0b4ecaab710353e83f0c740e2e998d26';
public const PACKAGE_VERSION = 'd23308fd3f678ecffffe37cb0e6e01281a4f313a';
/**
* @var string
*/
public const RELEASE_DATE = '2021-11-18 10:45:37';
public const RELEASE_DATE = '2021-11-18 09:52:38';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211118\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -54,14 +54,8 @@ final class PHPStanStubLoader
}
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;
}

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit7a2a1be4b5abbb4363a302674997e1e3
class ComposerStaticInitbe3bdb07ccdb3ac5c5834ff6e684f024
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3553,9 +3553,9 @@ class ComposerStaticInit7a2a1be4b5abbb4363a302674997e1e3
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit7a2a1be4b5abbb4363a302674997e1e3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7a2a1be4b5abbb4363a302674997e1e3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7a2a1be4b5abbb4363a302674997e1e3::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitbe3bdb07ccdb3ac5c5834ff6e684f024::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbe3bdb07ccdb3ac5c5834ff6e684f024::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbe3bdb07ccdb3ac5c5834ff6e684f024::$classMap;
}, null, ClassLoader::class);
}

View File

@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211118\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit7a2a1be4b5abbb4363a302674997e1e3', false) && !interface_exists('ComposerAutoloaderInit7a2a1be4b5abbb4363a302674997e1e3', false) && !trait_exists('ComposerAutoloaderInit7a2a1be4b5abbb4363a302674997e1e3', false)) {
spl_autoload_call('RectorPrefix20211118\ComposerAutoloaderInit7a2a1be4b5abbb4363a302674997e1e3');
if (!class_exists('ComposerAutoloaderInitbe3bdb07ccdb3ac5c5834ff6e684f024', false) && !interface_exists('ComposerAutoloaderInitbe3bdb07ccdb3ac5c5834ff6e684f024', false) && !trait_exists('ComposerAutoloaderInitbe3bdb07ccdb3ac5c5834ff6e684f024', false)) {
spl_autoload_call('RectorPrefix20211118\ComposerAutoloaderInitbe3bdb07ccdb3ac5c5834ff6e684f024');
}
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('RectorPrefix20211118\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211118\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire7a2a1be4b5abbb4363a302674997e1e3')) {
function composerRequire7a2a1be4b5abbb4363a302674997e1e3() {
return \RectorPrefix20211118\composerRequire7a2a1be4b5abbb4363a302674997e1e3(...func_get_args());
if (!function_exists('composerRequirebe3bdb07ccdb3ac5c5834ff6e684f024')) {
function composerRequirebe3bdb07ccdb3ac5c5834ff6e684f024() {
return \RectorPrefix20211118\composerRequirebe3bdb07ccdb3ac5c5834ff6e684f024(...func_get_args());
}
}
if (!function_exists('parseArgs')) {