Updated Rector to commit 38cb4c9684

38cb4c9684 Move Bootstrap file includer to load in RectorContainerFactory (#2382)
This commit is contained in:
Tomas Votruba 2022-05-27 19:47:45 +00:00
parent efe571aff5
commit 85ff7027f7
12 changed files with 46 additions and 51 deletions

View File

@ -7,7 +7,7 @@
],
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "1.7.1"
"phpstan/phpstan": "^1.7.1"
},
"autoload": {
"files": [

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '0.13.1';
public const PACKAGE_VERSION = '38cb4c9684920ceeb121ced398fd7e3c70f6435e';
/**
* @var string
*/
public const RELEASE_DATE = '2022-05-27 17:27:04';
public const RELEASE_DATE = '2022-05-27 19:41:24';
/**
* @var string
*/

View File

@ -7,7 +7,6 @@ use Rector\Caching\Detector\ChangedFilesDetector;
use Rector\ChangesReporting\Output\JsonOutputFormatter;
use Rector\Core\Application\ApplicationFileProcessor;
use Rector\Core\Autoloading\AdditionalAutoloader;
use Rector\Core\Autoloading\BootstrapFilesIncluder;
use Rector\Core\Configuration\Option;
use Rector\Core\Console\Output\OutputFormatterCollector;
use Rector\Core\Contract\Console\OutputStyleInterface;
@ -46,11 +45,6 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
* @var \Rector\Core\Application\ApplicationFileProcessor
*/
private $applicationFileProcessor;
/**
* @readonly
* @var \Rector\Core\Autoloading\BootstrapFilesIncluder
*/
private $bootstrapFilesIncluder;
/**
* @readonly
* @var \Rector\Core\ValueObjectFactory\ProcessResultFactory
@ -81,13 +75,12 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
* @var \Rector\Core\Util\MemoryLimiter
*/
private $memoryLimiter;
public function __construct(\Rector\Core\Autoloading\AdditionalAutoloader $additionalAutoloader, \Rector\Caching\Detector\ChangedFilesDetector $changedFilesDetector, \Rector\Core\Reporting\MissingRectorRulesReporter $missingRectorRulesReporter, \Rector\Core\Application\ApplicationFileProcessor $applicationFileProcessor, \Rector\Core\Autoloading\BootstrapFilesIncluder $bootstrapFilesIncluder, \Rector\Core\ValueObjectFactory\ProcessResultFactory $processResultFactory, \Rector\Core\StaticReflection\DynamicSourceLocatorDecorator $dynamicSourceLocatorDecorator, \Rector\Core\Validation\EmptyConfigurableRectorChecker $emptyConfigurableRectorChecker, \Rector\Core\Console\Output\OutputFormatterCollector $outputFormatterCollector, \Rector\Core\Contract\Console\OutputStyleInterface $rectorOutputStyle, \Rector\Core\Util\MemoryLimiter $memoryLimiter)
public function __construct(\Rector\Core\Autoloading\AdditionalAutoloader $additionalAutoloader, \Rector\Caching\Detector\ChangedFilesDetector $changedFilesDetector, \Rector\Core\Reporting\MissingRectorRulesReporter $missingRectorRulesReporter, \Rector\Core\Application\ApplicationFileProcessor $applicationFileProcessor, \Rector\Core\ValueObjectFactory\ProcessResultFactory $processResultFactory, \Rector\Core\StaticReflection\DynamicSourceLocatorDecorator $dynamicSourceLocatorDecorator, \Rector\Core\Validation\EmptyConfigurableRectorChecker $emptyConfigurableRectorChecker, \Rector\Core\Console\Output\OutputFormatterCollector $outputFormatterCollector, \Rector\Core\Contract\Console\OutputStyleInterface $rectorOutputStyle, \Rector\Core\Util\MemoryLimiter $memoryLimiter)
{
$this->additionalAutoloader = $additionalAutoloader;
$this->changedFilesDetector = $changedFilesDetector;
$this->missingRectorRulesReporter = $missingRectorRulesReporter;
$this->applicationFileProcessor = $applicationFileProcessor;
$this->bootstrapFilesIncluder = $bootstrapFilesIncluder;
$this->processResultFactory = $processResultFactory;
$this->dynamicSourceLocatorDecorator = $dynamicSourceLocatorDecorator;
$this->emptyConfigurableRectorChecker = $emptyConfigurableRectorChecker;
@ -114,8 +107,6 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
if ($configuration->getOutputFormat() === \Rector\ChangesReporting\Output\JsonOutputFormatter::NAME) {
$this->rectorOutputStyle->setVerbosity(\RectorPrefix20220527\Symfony\Component\Console\Output\OutputInterface::VERBOSITY_QUIET);
}
// register autoloaded and included files
$this->bootstrapFilesIncluder->includeBootstrapFiles();
$this->additionalAutoloader->autoloadInput($input);
$this->additionalAutoloader->autoloadPaths();
$paths = $configuration->getPaths();

View File

@ -6,6 +6,7 @@ namespace Rector\Core\DependencyInjection;
use RectorPrefix20220527\Nette\Utils\FileSystem;
use RectorPrefix20220527\Psr\Container\ContainerInterface;
use Rector\Caching\Detector\ChangedFilesDetector;
use Rector\Core\Autoloading\BootstrapFilesIncluder;
use Rector\Core\Kernel\RectorKernel;
use Rector\Core\ValueObject\Bootstrap\BootstrapConfigs;
use RectorPrefix20220527\Symfony\Component\Console\Style\SymfonyStyle;
@ -31,6 +32,9 @@ final class RectorContainerFactory
$changedFilesDetector = $container->get(\Rector\Caching\Detector\ChangedFilesDetector::class);
$changedFilesDetector->setFirstResolvedConfigFileInfo($mainConfigFile);
}
/** @var BootstrapFilesIncluder $bootstrapFilesIncluder */
$bootstrapFilesIncluder = $container->get(\Rector\Core\Autoloading\BootstrapFilesIncluder::class);
$bootstrapFilesIncluder->includeBootstrapFiles();
return $container;
}
/**

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906
class ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirecb7f094a7367a446c3ae7baf09d83906($fileIdentifier, $file);
composerRequire44f61fef12f0d47baf874a32a3e977d6($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906
* @param string $file
* @return void
*/
function composerRequirecb7f094a7367a446c3ae7baf09d83906($fileIdentifier, $file)
function composerRequire44f61fef12f0d47baf874a32a3e977d6($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 ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906
class ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3871,9 +3871,9 @@ class ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcb7f094a7367a446c3ae7baf09d83906::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit44f61fef12f0d47baf874a32a3e977d6::$classMap;
}, null, ClassLoader::class);
}

View File

@ -981,17 +981,17 @@
},
{
"name": "phpstan\/phpstan",
"version": "1.7.1",
"version_normalized": "1.7.1.0",
"version": "1.7.2",
"version_normalized": "1.7.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719"
"reference": "c602f80d66ba425943b0f4aaa27010c822dd8f87"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/c602f80d66ba425943b0f4aaa27010c822dd8f87",
"reference": "c602f80d66ba425943b0f4aaa27010c822dd8f87",
"shasum": ""
},
"require": {
@ -1000,7 +1000,7 @@
"conflict": {
"phpstan\/phpstan-shim": "*"
},
"time": "2022-05-24T09:05:09+00:00",
"time": "2022-05-26T12:59:20+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@ -1019,7 +1019,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpstan\/issues",
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.7.1"
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.7.2"
},
"funding": [
{

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmKMn7kACgkQzxoQjQ56
5yB8HA/8D+fvpnUSxiFULbEmPsP0aTkPg67DTELC0EPPNCMwh1boPAI1Nl61k4tN
TiK7zqkwNzYKHTcHEX19+Bwo8WyqUp9MU03v8HrsTP8Tw155vUj3SZKcnvloyIQE
eyEUG992GA1j18GpLSLyHIBzAt+N70fgO53Nou21vHsEnlmxjXGjowrrVWT/AjFD
jJ17OtvLX0H5CHtGQLS1qaOvoOjkOf3eTC6EgjH7j7NO+TI/89qdp2MA9kr/xdCg
Jxwn2ybqtkoIFlT/WgsyK+595y0yjMgxWouFFWIdmlkWOHH3AURsBWYGlBnzVOoM
X2MvSEZNQCL7Nnobh5A98SDoliO8wx2GkIPfGWp6cxARZLd5akG3pfpsvAO1X+oI
RSd52JFIK7GPrpFmgP43nZTg7OG0GhG+Gmiv7RfOx77HoeDAjwVTQD52jeguZJBn
CJ4vfu57STkGcQjskuFPfu2AEPrNf3A9+g5ZvOmeR81ss3Wle5ZmSAHZ/IbVGUuY
P93g/4x5tFiwLewS8SjIhxFSWiiYxwXT7cs3vb6GytPIRAbs0gvHwsvUQSmDU58P
oInTK4rgrWwPvaoiz1xZ6s50Dl1ch2RVrCynzgQNksUBs1oJvB4pu82jOURQjuFX
rkv8XATtD9kGEcB1QMWsp4MINGgeQfTYxXCHUisRMY6ADQ3TRA4=
=PFW6
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmKPeZwACgkQzxoQjQ56
5yAYmxAAnfmETFOcFSFM9441+nrtxVMnQOMJuyMfBTL6dgEYPVKBEJbQ8GrIHxXb
eVGLrAe5uZ17uGnJvJHTqxETgA0YhtN1/sc+kt5B0tMy1riOFPCCe3snSUuZhTaP
cubZ4+ZQjopI5klCBxx4XRFWuXMneq2TcHAnOWrzGoofgVVShvqzCRUYS2nq+esp
W8NGZJ9oMVTO15ITbJKgk70dtzJA0wlPi04wf3kKSiO1cMnff0REgsmnctJyZOz3
OFGEMAhwoFOkqLCyyL2EFySOPZ1OOCn5p/b7ENtCEfwDsbJDfmDsLB3KzJa+sRFL
H3EQ5R3tm0s8RSM68tYheIHizIqRD9D6fH5jAp18EuEpDreRV0Qa6UkSXrwADwdu
F3LbI9Re2doEeI335UawoKlz4unTFEEBSQDLkLTwZ9dDAOPdBa33LJ0LXpQ/INqL
GlyKMvexktZhVlf4tu6UJYEvgDLYqsMw4mGhZ5IlEwmNW7O0LnEQzhjX0HOjz0l/
UzmI0BObaYLsJl4Yf6eqgf97b5BoMb9EFpVVffDY/32PgkaaAVIuVaREXymdKzE0
igZLdKaIlNUwCFPQr7wGznd2o+RpiM759DIwgHScxWaqAyGFiiujG+Xv3Dp1wd0c
ZHnWhnC9gUI2dogxAw+ZV8lRasPRhqvGgDNG1+MXTpo3Gc1MAKg=
=YGh2
-----END PGP SIGNATURE-----

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('RectorPrefix20220527\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906', false) && !interface_exists('ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906', false) && !trait_exists('ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906', false)) {
spl_autoload_call('RectorPrefix20220527\ComposerAutoloaderInitcb7f094a7367a446c3ae7baf09d83906');
if (!class_exists('ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6', false) && !interface_exists('ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6', false) && !trait_exists('ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6', false)) {
spl_autoload_call('RectorPrefix20220527\ComposerAutoloaderInit44f61fef12f0d47baf874a32a3e977d6');
}
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('RectorPrefix20220527\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220527\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirecb7f094a7367a446c3ae7baf09d83906')) {
function composerRequirecb7f094a7367a446c3ae7baf09d83906() {
return \RectorPrefix20220527\composerRequirecb7f094a7367a446c3ae7baf09d83906(...func_get_args());
if (!function_exists('composerRequire44f61fef12f0d47baf874a32a3e977d6')) {
function composerRequire44f61fef12f0d47baf874a32a3e977d6() {
return \RectorPrefix20220527\composerRequire44f61fef12f0d47baf874a32a3e977d6(...func_get_args());
}
}
if (!function_exists('scanPath')) {