Updated Rector to commit 41413f3588

41413f3588 [Parallel] Refactor file processor to return arrays of data to allow json (#1378)
This commit is contained in:
Tomas Votruba 2021-12-04 19:10:58 +00:00
parent b304a9b96f
commit 49a3737430
18 changed files with 124 additions and 75 deletions

View File

@ -7,7 +7,7 @@ use RectorPrefix20211204\Nette\Utils\Strings;
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
use Rector\Core\Contract\Console\OutputStyleInterface;
use Rector\Core\ValueObject\Application\RectorError;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\Configuration;
use Rector\Core\ValueObject\ProcessResult;
use Rector\Core\ValueObject\Reporting\FileDiff;
@ -91,7 +91,7 @@ final class ConsoleOutputFormatter implements \Rector\ChangesReporting\Contract\
}
}
/**
* @param RectorError[] $errors
* @param SystemError[] $errors
*/
private function reportErrors(array $errors) : void
{

View File

@ -5,7 +5,7 @@ namespace Rector\ChangesReporting\ValueObjectFactory;
use PHPStan\AnalysedCodeException;
use Rector\Core\Error\ExceptionCorrector;
use Rector\Core\ValueObject\Application\RectorError;
use Rector\Core\ValueObject\Application\SystemError;
use Symplify\SmartFileSystem\SmartFileInfo;
final class ErrorFactory
{
@ -18,9 +18,9 @@ final class ErrorFactory
{
$this->exceptionCorrector = $exceptionCorrector;
}
public function createAutoloadError(\PHPStan\AnalysedCodeException $analysedCodeException, \Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : \Rector\Core\ValueObject\Application\RectorError
public function createAutoloadError(\PHPStan\AnalysedCodeException $analysedCodeException, \Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : \Rector\Core\ValueObject\Application\SystemError
{
$message = $this->exceptionCorrector->getAutoloadExceptionMessageAndAddLocation($analysedCodeException);
return new \Rector\Core\ValueObject\Application\RectorError($message, $smartFileInfo->getRelativeFilePathFromCwd());
return new \Rector\Core\ValueObject\Application\SystemError($message, $smartFileInfo->getRelativeFilePathFromCwd());
}
}

View File

@ -3,10 +3,14 @@
declare (strict_types=1);
namespace Rector\Composer\Application\FileProcessor;
use Rector\ChangesReporting\ValueObjectFactory\FileDiffFactory;
use Rector\Composer\Contract\Rector\ComposerRectorInterface;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\ValueObject\Application\File;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\Configuration;
use Rector\Core\ValueObject\Reporting\FileDiff;
use Rector\Parallel\ValueObject\Bridge;
use Rector\Testing\PHPUnit\StaticPHPUnitEnvironment;
use RectorPrefix20211204\Symplify\ComposerJsonManipulator\ComposerJsonFactory;
use RectorPrefix20211204\Symplify\ComposerJsonManipulator\Printer\ComposerJsonPrinter;
@ -23,6 +27,11 @@ final class ComposerFileProcessor implements \Rector\Core\Contract\Processor\Fil
* @var \Symplify\ComposerJsonManipulator\Printer\ComposerJsonPrinter
*/
private $composerJsonPrinter;
/**
* @readonly
* @var \Rector\ChangesReporting\ValueObjectFactory\FileDiffFactory
*/
private $fileDiffFactory;
/**
* @var \Rector\Composer\Contract\Rector\ComposerRectorInterface[]
* @readonly
@ -31,23 +40,27 @@ final class ComposerFileProcessor implements \Rector\Core\Contract\Processor\Fil
/**
* @param ComposerRectorInterface[] $composerRectors
*/
public function __construct(\RectorPrefix20211204\Symplify\ComposerJsonManipulator\ComposerJsonFactory $composerJsonFactory, \RectorPrefix20211204\Symplify\ComposerJsonManipulator\Printer\ComposerJsonPrinter $composerJsonPrinter, array $composerRectors)
public function __construct(\RectorPrefix20211204\Symplify\ComposerJsonManipulator\ComposerJsonFactory $composerJsonFactory, \RectorPrefix20211204\Symplify\ComposerJsonManipulator\Printer\ComposerJsonPrinter $composerJsonPrinter, \Rector\ChangesReporting\ValueObjectFactory\FileDiffFactory $fileDiffFactory, array $composerRectors)
{
$this->composerJsonFactory = $composerJsonFactory;
$this->composerJsonPrinter = $composerJsonPrinter;
$this->fileDiffFactory = $fileDiffFactory;
$this->composerRectors = $composerRectors;
}
/**
* @return array{system_errors: SystemError[], file_diffs: FileDiff[]}
* @param \Rector\Core\ValueObject\Application\File $file
* @param \Rector\Core\ValueObject\Configuration $configuration
*/
public function process($file, $configuration) : void
public function process($file, $configuration) : array
{
$systemErrorsAndFileDiffs = [\Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS => [], \Rector\Parallel\ValueObject\Bridge::FILE_DIFFS => []];
if ($this->composerRectors === []) {
return;
return $systemErrorsAndFileDiffs;
}
// to avoid modification of file
$smartFileInfo = $file->getSmartFileInfo();
$oldFileContents = $smartFileInfo->getContents();
$composerJson = $this->composerJsonFactory->createFromFileInfo($smartFileInfo);
$oldComposerJson = clone $composerJson;
foreach ($this->composerRectors as $composerRector) {
@ -55,10 +68,13 @@ final class ComposerFileProcessor implements \Rector\Core\Contract\Processor\Fil
}
// nothing has changed
if ($oldComposerJson->getJsonArray() === $composerJson->getJsonArray()) {
return;
return $systemErrorsAndFileDiffs;
}
$changeFileContent = $this->composerJsonPrinter->printToString($composerJson);
$file->changeFileContent($changeFileContent);
$changedFileContent = $this->composerJsonPrinter->printToString($composerJson);
$file->changeFileContent($changedFileContent);
$fileDiff = $this->fileDiffFactory->createFileDiff($file, $oldFileContents, $changedFileContent);
$systemErrorsAndFileDiffs[\Rector\Parallel\ValueObject\Bridge::FILE_DIFFS] = [$fileDiff];
return $systemErrorsAndFileDiffs;
}
/**
* @param \Rector\Core\ValueObject\Application\File $file

View File

@ -7,8 +7,11 @@ use Rector\Core\Application\FileDecorator\FileDiffFileDecorator;
use Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\ValueObject\Application\File;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\Configuration;
use Rector\Core\ValueObject\Reporting\FileDiff;
use Rector\FileFormatter\FileFormatter;
use Rector\Parallel\ValueObject\Bridge;
use RectorPrefix20211204\Symfony\Component\Console\Style\SymfonyStyle;
use RectorPrefix20211204\Symplify\SmartFileSystem\SmartFileSystem;
final class ApplicationFileProcessor
@ -57,29 +60,36 @@ final class ApplicationFileProcessor
}
/**
* @param File[] $files
* @return array{system_errors: SystemError[], file_diffs: FileDiff[]}
*/
public function run(array $files, \Rector\Core\ValueObject\Configuration $configuration) : void
public function run(array $files, \Rector\Core\ValueObject\Configuration $configuration) : array
{
$this->processFiles($files, $configuration);
$systemErrorsAndFileDiffs = $this->processFiles($files, $configuration);
$this->fileFormatter->format($files);
$this->fileDiffFileDecorator->decorate($files);
$this->printFiles($files, $configuration);
return $systemErrorsAndFileDiffs;
}
/**
* @param File[] $files
* @return array{system_errors: SystemError[], file_diffs: FileDiff[]}
*/
private function processFiles(array $files, \Rector\Core\ValueObject\Configuration $configuration) : void
private function processFiles(array $files, \Rector\Core\ValueObject\Configuration $configuration) : array
{
if ($configuration->shouldShowProgressBar()) {
$fileCount = \count($files);
$this->symfonyStyle->progressStart($fileCount);
}
$systemErrorsAndFileDiffs = [\Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS => [], \Rector\Parallel\ValueObject\Bridge::FILE_DIFFS => []];
foreach ($files as $file) {
foreach ($this->fileProcessors as $fileProcessor) {
if (!$fileProcessor->supports($file, $configuration)) {
continue;
}
$fileProcessor->process($file, $configuration);
$result = $fileProcessor->process($file, $configuration);
if (\is_array($result)) {
$systemErrorsAndFileDiffs = \array_merge($systemErrorsAndFileDiffs, $result);
}
}
// progress bar +1
if ($configuration->shouldShowProgressBar()) {
@ -87,6 +97,7 @@ final class ApplicationFileProcessor
}
}
$this->removedAndAddedFilesProcessor->run($configuration);
return $systemErrorsAndFileDiffs;
}
/**
* @param File[] $files

View File

@ -14,8 +14,10 @@ use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\PhpParser\Printer\FormatPerservingPrinter;
use Rector\Core\Provider\CurrentFileProvider;
use Rector\Core\ValueObject\Application\File;
use Rector\Core\ValueObject\Application\RectorError;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\Configuration;
use Rector\Core\ValueObject\Reporting\FileDiff;
use Rector\Parallel\ValueObject\Bridge;
use Rector\PostRector\Application\PostFileProcessor;
use Rector\Testing\PHPUnit\StaticPHPUnitEnvironment;
use RectorPrefix20211204\Symfony\Component\Console\Style\SymfonyStyle;
@ -78,10 +80,11 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
$this->errorFactory = $errorFactory;
}
/**
* @return array{system_errors: SystemError[], file_diffs: FileDiff[]}
* @param \Rector\Core\ValueObject\Application\File $file
* @param \Rector\Core\ValueObject\Configuration $configuration
*/
public function process($file, $configuration) : void
public function process($file, $configuration) : array
{
// 1. parse files to nodes
$this->tryCatchWrapper($file, function (\Rector\Core\ValueObject\Application\File $file) : void {
@ -116,6 +119,9 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
$this->printFile($file, $configuration);
}, \Rector\Core\Enum\ApplicationPhase::PRINT());
} while ($file->hasChanged());
// return json here
$fileDiff = $file->getFileDiff();
return [\Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS => $file->getErrors(), \Rector\Parallel\ValueObject\Bridge::FILE_DIFFS => $fileDiff instanceof \Rector\Core\ValueObject\Reporting\FileDiff ? [$fileDiff] : []];
}
/**
* @param \Rector\Core\ValueObject\Application\File $file
@ -164,8 +170,8 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
if ($this->symfonyStyle->isVerbose() || \Rector\Testing\PHPUnit\StaticPHPUnitEnvironment::isPHPUnitRun()) {
throw $throwable;
}
$rectorError = new \Rector\Core\ValueObject\Application\RectorError($throwable->getMessage(), $file->getRelativeFilePath(), $throwable->getLine());
$file->addRectorError($rectorError);
$systemError = new \Rector\Core\ValueObject\Application\SystemError($throwable->getMessage(), $file->getRelativeFilePath(), $throwable->getLine());
$file->addRectorError($systemError);
}
}
private function printFile(\Rector\Core\ValueObject\Application\File $file, \Rector\Core\ValueObject\Configuration $configuration) : void

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '2c394f524607e563934acd5e4e3ced94c7fa557f';
public const PACKAGE_VERSION = '41413f358863928c1275d4603353f82f223adaf5';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-05 00:19:23';
public const RELEASE_DATE = '2021-12-04 19:55:41';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211204\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -162,13 +162,13 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
$this->configurePHPStanNodeScopeResolver($files);
// MAIN PHASE
// 5. run Rector
$this->applicationFileProcessor->run($files, $configuration);
$systemErrorsAndFileDiffs = $this->applicationFileProcessor->run($files, $configuration);
// REPORTING PHASE
// 6. reporting phase
// report diffs and errors
$outputFormat = $configuration->getOutputFormat();
$outputFormatter = $this->outputFormatterCollector->getByName($outputFormat);
$processResult = $this->processResultFactory->create($files);
$processResult = $this->processResultFactory->create($systemErrorsAndFileDiffs);
$outputFormatter->report($processResult, $configuration);
// invalidate affected files
$this->invalidateCacheChangedFiles($processResult);

View File

@ -13,10 +13,11 @@ interface FileProcessorInterface
*/
public function supports($file, $configuration) : bool;
/**
* @return mixed[]|void
* @param \Rector\Core\ValueObject\Application\File $file
* @param \Rector\Core\ValueObject\Configuration $configuration
*/
public function process($file, $configuration) : void;
public function process($file, $configuration);
/**
* @return string[]
*/

View File

@ -0,0 +1,15 @@
<?php
declare (strict_types=1);
namespace Rector\Core;
/**
* @api
*/
final class UnusedPrivateConstant
{
/**
* @var string
*/
private const SOME = 'some';
}

View File

@ -43,9 +43,9 @@ final class File
*/
private $rectorWithLineChanges = [];
/**
* @var RectorError[]
* @var SystemError[]
*/
private $rectorErrors = [];
private $systemErrors = [];
/**
* @readonly
* @var \Symplify\SmartFileSystem\SmartFileInfo
@ -158,20 +158,20 @@ final class File
{
return $this->rectorWithLineChanges;
}
public function addRectorError(\Rector\Core\ValueObject\Application\RectorError $rectorError) : void
public function addRectorError(\Rector\Core\ValueObject\Application\SystemError $systemError) : void
{
$this->rectorErrors[] = $rectorError;
$this->systemErrors[] = $systemError;
}
public function hasErrors() : bool
{
return $this->rectorErrors !== [];
return $this->systemErrors !== [];
}
/**
* @return RectorError[]
* @return SystemError[]
*/
public function getErrors() : array
{
return $this->rectorErrors;
return $this->systemErrors;
}
public function getRelativeFilePath() : string
{

View File

@ -5,7 +5,7 @@ namespace Rector\Core\ValueObject\Application;
use Rector\Core\Contract\Rector\RectorInterface;
use RectorPrefix20211204\Symplify\EasyParallel\Contract\SerializableInterface;
final class RectorError implements \RectorPrefix20211204\Symplify\EasyParallel\Contract\SerializableInterface
final class SystemError implements \RectorPrefix20211204\Symplify\EasyParallel\Contract\SerializableInterface
{
/**
* @readonly

View File

@ -3,7 +3,7 @@
declare (strict_types=1);
namespace Rector\Core\ValueObject;
use Rector\Core\ValueObject\Application\RectorError;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\Reporting\FileDiff;
use Symplify\SmartFileSystem\SmartFileInfo;
use RectorPrefix20211204\Webmozart\Assert\Assert;
@ -13,13 +13,15 @@ use RectorPrefix20211204\Webmozart\Assert\Assert;
final class ProcessResult
{
/**
* @var FileDiff[]
* @var \Rector\Core\ValueObject\Application\SystemError[]
* @readonly
*/
private $fileDiffs = [];
private $systemErrors;
/**
* @var RectorError[]
* @var \Rector\Core\ValueObject\Reporting\FileDiff[]
* @readonly
*/
private $errors = [];
private $fileDiffs;
/**
* @readonly
* @var int
@ -37,17 +39,17 @@ final class ProcessResult
private $removedNodeCount;
/**
* @param FileDiff[] $fileDiffs
* @param RectorError[] $errors
* @param SystemError[] $systemErrors
*/
public function __construct(array $fileDiffs, array $errors, int $addedFilesCount, int $removedFilesCount, int $removedNodeCount)
public function __construct(array $systemErrors, array $fileDiffs, int $addedFilesCount, int $removedFilesCount, int $removedNodeCount)
{
$this->systemErrors = $systemErrors;
$this->fileDiffs = $fileDiffs;
$this->addedFilesCount = $addedFilesCount;
$this->removedFilesCount = $removedFilesCount;
$this->removedNodeCount = $removedNodeCount;
\RectorPrefix20211204\Webmozart\Assert\Assert::allIsAOf($fileDiffs, \Rector\Core\ValueObject\Reporting\FileDiff::class);
\RectorPrefix20211204\Webmozart\Assert\Assert::allIsAOf($errors, \Rector\Core\ValueObject\Application\RectorError::class);
$this->fileDiffs = $fileDiffs;
$this->errors = $errors;
\RectorPrefix20211204\Webmozart\Assert\Assert::allIsAOf($systemErrors, \Rector\Core\ValueObject\Application\SystemError::class);
}
/**
* @return FileDiff[]
@ -57,11 +59,11 @@ final class ProcessResult
return $this->fileDiffs;
}
/**
* @return RectorError[]
* @return SystemError[]
*/
public function getErrors() : array
{
return $this->errors;
return $this->systemErrors;
}
public function getAddedFilesCount() : int
{

View File

@ -5,7 +5,10 @@ namespace Rector\Core\ValueObjectFactory;
use Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector;
use Rector\Core\ValueObject\Application\File;
use Rector\Core\ValueObject\Application\SystemError;
use Rector\Core\ValueObject\ProcessResult;
use Rector\Core\ValueObject\Reporting\FileDiff;
use Rector\Parallel\ValueObject\Bridge;
use Rector\PostRector\Collector\NodesToRemoveCollector;
final class ProcessResultFactory
{
@ -25,19 +28,12 @@ final class ProcessResultFactory
$this->nodesToRemoveCollector = $nodesToRemoveCollector;
}
/**
* @param File[] $files
* @param array{system_errors: SystemError[], file_diffs: FileDiff[]} $errorsAndFileDiffs
*/
public function create(array $files) : \Rector\Core\ValueObject\ProcessResult
public function create(array $errorsAndFileDiffs) : \Rector\Core\ValueObject\ProcessResult
{
$fileDiffs = [];
$errors = [];
foreach ($files as $file) {
$errors = \array_merge($errors, $file->getErrors());
if ($file->getFileDiff() === null) {
continue;
}
$fileDiffs[] = $file->getFileDiff();
}
return new \Rector\Core\ValueObject\ProcessResult($fileDiffs, $errors, $this->removedAndAddedFilesCollector->getAddedFileCount(), $this->removedAndAddedFilesCollector->getRemovedFilesCount(), $this->nodesToRemoveCollector->getCount());
$systemErrors = $errorsAndFileDiffs[\Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS];
$fileDiffs = $errorsAndFileDiffs[\Rector\Parallel\ValueObject\Bridge::FILE_DIFFS];
return new \Rector\Core\ValueObject\ProcessResult($systemErrors, $fileDiffs, $this->removedAndAddedFilesCollector->getAddedFileCount(), $this->removedAndAddedFilesCollector->getRemovedFilesCount(), $this->nodesToRemoveCollector->getCount());
}
}

2
vendor/autoload.php vendored
View File

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

View File

@ -1769,6 +1769,7 @@ return array(
'Rector\\Core\\Stubs\\DummyTraitClass' => $baseDir . '/src/Stubs/DummyTraitClass.php',
'Rector\\Core\\Stubs\\PHPStanStubLoader' => $baseDir . '/src/Stubs/PHPStanStubLoader.php',
'Rector\\Core\\Template\\DefaultResolver' => $baseDir . '/src/Template/DefaultResolver.php',
'Rector\\Core\\UnusedPrivateConstant' => $baseDir . '/src/UnusedPrivateConstant.php',
'Rector\\Core\\Util\\PhpVersionFactory' => $baseDir . '/src/Util/PhpVersionFactory.php',
'Rector\\Core\\Util\\StaticRectorStrings' => $baseDir . '/src/Util/StaticRectorStrings.php',
'Rector\\Core\\Util\\StringUtils' => $baseDir . '/src/Util/StringUtils.php',
@ -1780,7 +1781,7 @@ return array(
'Rector\\Core\\ValueObjectFactory\\ProcessResultFactory' => $baseDir . '/src/ValueObjectFactory/ProcessResultFactory.php',
'Rector\\Core\\ValueObject\\Application\\File' => $baseDir . '/src/ValueObject/Application/File.php',
'Rector\\Core\\ValueObject\\Application\\MovedFile' => $baseDir . '/src/ValueObject/Application/MovedFile.php',
'Rector\\Core\\ValueObject\\Application\\RectorError' => $baseDir . '/src/ValueObject/Application/RectorError.php',
'Rector\\Core\\ValueObject\\Application\\SystemError' => $baseDir . '/src/ValueObject/Application/SystemError.php',
'Rector\\Core\\ValueObject\\Bootstrap\\BootstrapConfigs' => $baseDir . '/src/ValueObject/Bootstrap/BootstrapConfigs.php',
'Rector\\Core\\ValueObject\\Configuration' => $baseDir . '/src/ValueObject/Configuration.php',
'Rector\\Core\\ValueObject\\Error\\SystemError' => $baseDir . '/src/ValueObject/Error/SystemError.php',

View File

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

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16
class ComposerStaticInit0a0f7ed647f95825022777dd6d23bbe7
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -2166,6 +2166,7 @@ class ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16
'Rector\\Core\\Stubs\\DummyTraitClass' => __DIR__ . '/../..' . '/src/Stubs/DummyTraitClass.php',
'Rector\\Core\\Stubs\\PHPStanStubLoader' => __DIR__ . '/../..' . '/src/Stubs/PHPStanStubLoader.php',
'Rector\\Core\\Template\\DefaultResolver' => __DIR__ . '/../..' . '/src/Template/DefaultResolver.php',
'Rector\\Core\\UnusedPrivateConstant' => __DIR__ . '/../..' . '/src/UnusedPrivateConstant.php',
'Rector\\Core\\Util\\PhpVersionFactory' => __DIR__ . '/../..' . '/src/Util/PhpVersionFactory.php',
'Rector\\Core\\Util\\StaticRectorStrings' => __DIR__ . '/../..' . '/src/Util/StaticRectorStrings.php',
'Rector\\Core\\Util\\StringUtils' => __DIR__ . '/../..' . '/src/Util/StringUtils.php',
@ -2177,7 +2178,7 @@ class ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16
'Rector\\Core\\ValueObjectFactory\\ProcessResultFactory' => __DIR__ . '/../..' . '/src/ValueObjectFactory/ProcessResultFactory.php',
'Rector\\Core\\ValueObject\\Application\\File' => __DIR__ . '/../..' . '/src/ValueObject/Application/File.php',
'Rector\\Core\\ValueObject\\Application\\MovedFile' => __DIR__ . '/../..' . '/src/ValueObject/Application/MovedFile.php',
'Rector\\Core\\ValueObject\\Application\\RectorError' => __DIR__ . '/../..' . '/src/ValueObject/Application/RectorError.php',
'Rector\\Core\\ValueObject\\Application\\SystemError' => __DIR__ . '/../..' . '/src/ValueObject/Application/SystemError.php',
'Rector\\Core\\ValueObject\\Bootstrap\\BootstrapConfigs' => __DIR__ . '/../..' . '/src/ValueObject/Bootstrap/BootstrapConfigs.php',
'Rector\\Core\\ValueObject\\Configuration' => __DIR__ . '/../..' . '/src/ValueObject/Configuration.php',
'Rector\\Core\\ValueObject\\Error\\SystemError' => __DIR__ . '/../..' . '/src/ValueObject/Error/SystemError.php',
@ -3797,9 +3798,9 @@ class ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf8b497a70bd9ea2897a022ddd7e72c16::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit0a0f7ed647f95825022777dd6d23bbe7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit0a0f7ed647f95825022777dd6d23bbe7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit0a0f7ed647f95825022777dd6d23bbe7::$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('RectorPrefix20211204\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitf8b497a70bd9ea2897a022ddd7e72c16', false) && !interface_exists('ComposerAutoloaderInitf8b497a70bd9ea2897a022ddd7e72c16', false) && !trait_exists('ComposerAutoloaderInitf8b497a70bd9ea2897a022ddd7e72c16', false)) {
spl_autoload_call('RectorPrefix20211204\ComposerAutoloaderInitf8b497a70bd9ea2897a022ddd7e72c16');
if (!class_exists('ComposerAutoloaderInit0a0f7ed647f95825022777dd6d23bbe7', false) && !interface_exists('ComposerAutoloaderInit0a0f7ed647f95825022777dd6d23bbe7', false) && !trait_exists('ComposerAutoloaderInit0a0f7ed647f95825022777dd6d23bbe7', false)) {
spl_autoload_call('RectorPrefix20211204\ComposerAutoloaderInit0a0f7ed647f95825022777dd6d23bbe7');
}
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('RectorPrefix20211204\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211204\print_node(...func_get_args());
}
}
if (!function_exists('composerRequiref8b497a70bd9ea2897a022ddd7e72c16')) {
function composerRequiref8b497a70bd9ea2897a022ddd7e72c16() {
return \RectorPrefix20211204\composerRequiref8b497a70bd9ea2897a022ddd7e72c16(...func_get_args());
if (!function_exists('composerRequire0a0f7ed647f95825022777dd6d23bbe7')) {
function composerRequire0a0f7ed647f95825022777dd6d23bbe7() {
return \RectorPrefix20211204\composerRequire0a0f7ed647f95825022777dd6d23bbe7(...func_get_args());
}
}
if (!function_exists('scanPath')) {