mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit b17d4a39222960783a78207f24d404d8dbc97eab
b17d4a3922
[Testing] Make temp fixture file names exposed next to the fixture file, to make easier fixes and path resolvements (#3338)
This commit is contained in:
parent
e7daa642b3
commit
8c3f7d543f
|
@ -6,6 +6,9 @@ namespace Rector\Testing\Fixture;
|
|||
use RectorPrefix202302\Nette\Utils\FileSystem;
|
||||
use RectorPrefix202302\Nette\Utils\Strings;
|
||||
use RectorPrefix202302\Webmozart\Assert\Assert;
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
final class FixtureSplitter
|
||||
{
|
||||
/**
|
||||
|
@ -14,12 +17,15 @@ final class FixtureSplitter
|
|||
* @see https://regex101.com/r/zZDoyy/1
|
||||
*/
|
||||
public const SPLIT_LINE_REGEX = '#\\-\\-\\-\\-\\-\\r?\\n#';
|
||||
public static function containsSplit(string $fixtureFileContent) : bool
|
||||
{
|
||||
return Strings::match($fixtureFileContent, self::SPLIT_LINE_REGEX) !== null;
|
||||
}
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function loadFileAndSplitInputAndExpected(string $filePath) : array
|
||||
public static function split(string $filePath) : array
|
||||
{
|
||||
Assert::fileExists($filePath);
|
||||
$fixtureFileContents = FileSystem::read($filePath);
|
||||
return Strings::split($fixtureFileContents, self::SPLIT_LINE_REGEX);
|
||||
}
|
||||
|
|
|
@ -4,25 +4,20 @@ declare (strict_types=1);
|
|||
namespace Rector\Testing\Fixture;
|
||||
|
||||
use RectorPrefix202302\Nette\Utils\FileSystem;
|
||||
/**
|
||||
* @api used in tests
|
||||
*/
|
||||
final class FixtureTempFileDumper
|
||||
{
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const TEMP_FIXTURE_DIRECTORY = '/rector/tests_fixture_';
|
||||
public static function dump(string $fileContents, string $suffix = 'php') : string
|
||||
{
|
||||
// the "php" suffix is important, because that will hook into \Rector\Core\Application\FileProcessor\PhpFileProcessor
|
||||
$temporaryFileName = self::getTempDirectory() . '/' . \md5($fileContents) . '.' . $suffix;
|
||||
$temporaryFileName = \sys_get_temp_dir() . self::TEMP_FIXTURE_DIRECTORY . '/' . \md5($fileContents) . '.' . $suffix;
|
||||
FileSystem::write($temporaryFileName, $fileContents);
|
||||
return $temporaryFileName;
|
||||
}
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public static function getTempDirectory() : string
|
||||
{
|
||||
return \sys_get_temp_dir() . self::TEMP_FIXTURE_DIRECTORY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,33 +16,29 @@ use Rector\Core\Autoloading\BootstrapFilesIncluder;
|
|||
use Rector\Core\Configuration\ConfigurationFactory;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Configuration\Parameter\ParameterProvider;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
|
||||
use Rector\Testing\Contract\RectorTestInterface;
|
||||
use Rector\Testing\Fixture\FixtureFileFinder;
|
||||
use Rector\Testing\Fixture\FixtureFileUpdater;
|
||||
use Rector\Testing\Fixture\FixtureSplitter;
|
||||
use Rector\Testing\Fixture\FixtureTempFileDumper;
|
||||
use Rector\Testing\PHPUnit\Behavior\MovingFilesTrait;
|
||||
abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTestCase implements RectorTestInterface
|
||||
{
|
||||
use MovingFilesTrait;
|
||||
/**
|
||||
* @var \Rector\Core\Configuration\Parameter\ParameterProvider
|
||||
*/
|
||||
protected $parameterProvider;
|
||||
/**
|
||||
* @var \Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector
|
||||
*/
|
||||
protected $removedAndAddedFilesCollector;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $originalTempFilePath;
|
||||
/**
|
||||
* @var \Psr\Container\ContainerInterface|null
|
||||
*/
|
||||
protected static $allRectorContainer;
|
||||
/**
|
||||
* @var \Rector\Core\Configuration\Parameter\ParameterProvider
|
||||
*/
|
||||
private $parameterProvider;
|
||||
/**
|
||||
* @var \Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider
|
||||
*/
|
||||
|
@ -51,6 +47,10 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
* @var \Rector\Core\Application\ApplicationFileProcessor
|
||||
*/
|
||||
private $applicationFileProcessor;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $inputFilePath;
|
||||
protected function setUp() : void
|
||||
{
|
||||
// speed up
|
||||
|
@ -73,8 +73,12 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
}
|
||||
protected function tearDown() : void
|
||||
{
|
||||
// clear temporary file
|
||||
if (\is_string($this->inputFilePath)) {
|
||||
FileSystem::delete($this->inputFilePath);
|
||||
}
|
||||
// free memory and trigger gc to reduce memory peak consumption on windows
|
||||
unset($this->applicationFileProcessor, $this->parameterProvider, $this->dynamicSourceLocatorProvider, $this->removedAndAddedFilesCollector, $this->originalTempFilePath);
|
||||
unset($this->applicationFileProcessor, $this->parameterProvider, $this->dynamicSourceLocatorProvider, $this->removedAndAddedFilesCollector);
|
||||
\gc_collect_cycles();
|
||||
}
|
||||
/**
|
||||
|
@ -90,40 +94,25 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
}
|
||||
protected function doTestFile(string $fixtureFilePath) : void
|
||||
{
|
||||
// prepare input file contents and expected file output contents
|
||||
$fixtureFileContents = FileSystem::read($fixtureFilePath);
|
||||
if (Strings::match($fixtureFileContents, FixtureSplitter::SPLIT_LINE_REGEX)) {
|
||||
if (FixtureSplitter::containsSplit($fixtureFileContents)) {
|
||||
// changed content
|
||||
[$inputFileContents, $expectedFileContents] = FixtureSplitter::loadFileAndSplitInputAndExpected($fixtureFilePath);
|
||||
[$inputFileContents, $expectedFileContents] = FixtureSplitter::split($fixtureFilePath);
|
||||
} else {
|
||||
// no change
|
||||
$inputFileContents = $fixtureFileContents;
|
||||
$expectedFileContents = $fixtureFileContents;
|
||||
}
|
||||
$fileSuffix = $this->resolveOriginalFixtureFileSuffix($fixtureFilePath);
|
||||
$inputFilePath = FixtureTempFileDumper::dump($inputFileContents, $fileSuffix);
|
||||
$expectedFilePath = FixtureTempFileDumper::dump($expectedFileContents, $fileSuffix);
|
||||
$this->originalTempFilePath = $inputFilePath;
|
||||
$this->doTestFileMatchesExpectedContent($inputFilePath, $expectedFilePath, $fixtureFilePath);
|
||||
}
|
||||
protected static function getFixtureTempDirectory() : string
|
||||
{
|
||||
return FixtureTempFileDumper::getTempDirectory();
|
||||
}
|
||||
private function resolveExpectedContents(string $filePath) : string
|
||||
{
|
||||
$contents = FileSystem::read($filePath);
|
||||
// make sure we don't get a diff in which every line is different (because of differences in EOL)
|
||||
return \str_replace("\r\n", "\n", $contents);
|
||||
}
|
||||
private function resolveOriginalFixtureFileSuffix(string $filePath) : string
|
||||
{
|
||||
if (\substr_compare($filePath, '.inc', -\strlen('.inc')) === 0) {
|
||||
$filePath = \rtrim($filePath, '.inc');
|
||||
$inputFilePath = $this->createInputFilePath($fixtureFilePath);
|
||||
// to remove later in tearDown()
|
||||
$this->inputFilePath = $inputFilePath;
|
||||
if ($fixtureFilePath === $inputFilePath) {
|
||||
throw new ShouldNotHappenException('Fixture file and input file cannot be the same: ' . $fixtureFilePath);
|
||||
}
|
||||
if (\substr_compare($filePath, '.blade.php', -\strlen('.blade.php')) === 0) {
|
||||
return 'blade.php';
|
||||
}
|
||||
return \pathinfo($filePath, \PATHINFO_EXTENSION);
|
||||
// write temp file
|
||||
FileSystem::write($inputFilePath, $inputFileContents);
|
||||
$this->doTestFileMatchesExpectedContent($inputFilePath, $expectedFileContents, $fixtureFilePath);
|
||||
}
|
||||
private function includePreloadFilesAndScoperAutoload() : void
|
||||
{
|
||||
|
@ -139,7 +128,7 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
require_once __DIR__ . '/../../../vendor/scoper-autoload.php';
|
||||
}
|
||||
}
|
||||
private function doTestFileMatchesExpectedContent(string $originalFilePath, string $expectedFilePath, string $fixtureFilePath) : void
|
||||
private function doTestFileMatchesExpectedContent(string $originalFilePath, string $expectedFileContents, string $fixtureFilePath) : void
|
||||
{
|
||||
$this->parameterProvider->changeParameter(Option::SOURCE, [$originalFilePath]);
|
||||
$changedContent = $this->processFilePath($originalFilePath);
|
||||
|
@ -148,12 +137,11 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
return;
|
||||
}
|
||||
try {
|
||||
$this->assertStringEqualsFile($expectedFilePath, $changedContent);
|
||||
$this->assertSame($expectedFileContents, $changedContent);
|
||||
} catch (ExpectationFailedException $exception) {
|
||||
FixtureFileUpdater::updateFixtureContent($originalFilePath, $changedContent, $fixtureFilePath);
|
||||
$contents = $this->resolveExpectedContents($expectedFilePath);
|
||||
// if not exact match, check the regex version (useful for generated hashes/uuids in the code)
|
||||
$this->assertStringMatchesFormat($contents, $changedContent);
|
||||
$this->assertStringMatchesFormat($expectedFileContents, $changedContent);
|
||||
}
|
||||
}
|
||||
private function processFilePath(string $filePath) : string
|
||||
|
@ -170,4 +158,16 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
|
|||
$this->applicationFileProcessor->processFiles([$file], $configuration);
|
||||
return $file->getFileContent();
|
||||
}
|
||||
private function createInputFilePath(string $fixtureFilePath) : string
|
||||
{
|
||||
$inputFileDirectory = \dirname($fixtureFilePath);
|
||||
// remove ".inc" suffix
|
||||
if (\substr_compare($fixtureFilePath, '.inc', -\strlen('.inc')) === 0) {
|
||||
$trimmedFixtureFilePath = Strings::substring($fixtureFilePath, 0, -4);
|
||||
} else {
|
||||
$trimmedFixtureFilePath = $fixtureFilePath;
|
||||
}
|
||||
$fixtureBasename = \pathinfo($trimmedFixtureFilePath, \PATHINFO_BASENAME);
|
||||
return $inputFileDirectory . '/' . $fixtureBasename;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,39 +6,24 @@ namespace Rector\Testing\PHPUnit\Behavior;
|
|||
use Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector;
|
||||
use Rector\Core\PhpParser\Printer\NodesWithFileDestinationPrinter;
|
||||
use Rector\FileSystemRector\ValueObject\AddedFileWithContent;
|
||||
use Rector\Testing\Fixture\FixtureTempFileDumper;
|
||||
use RectorPrefix202302\Webmozart\Assert\Assert;
|
||||
/**
|
||||
* @property-read RemovedAndAddedFilesCollector $removedAndAddedFilesCollector
|
||||
*/
|
||||
trait MovingFilesTrait
|
||||
{
|
||||
protected function assertFileWasAdded(AddedFileWithContent $addedFileWithContent) : void
|
||||
protected function assertFileWasAdded(string $expectedFilePath, string $expectedFileContents) : void
|
||||
{
|
||||
$this->assertFilesWereAdded([$addedFileWithContent]);
|
||||
}
|
||||
/**
|
||||
* @param AddedFileWithContent[] $expectedAddedFileWithContents
|
||||
*/
|
||||
protected function assertFilesWereAdded(array $expectedAddedFileWithContents) : void
|
||||
{
|
||||
Assert::allIsAOf($expectedAddedFileWithContents, AddedFileWithContent::class);
|
||||
\sort($expectedAddedFileWithContents);
|
||||
$addedFilePathsWithContents = $this->resolveAddedFilePathsWithContents();
|
||||
\sort($addedFilePathsWithContents);
|
||||
// there should be at least some added files
|
||||
Assert::notEmpty($addedFilePathsWithContents);
|
||||
foreach ($addedFilePathsWithContents as $key => $addedFilePathWithContent) {
|
||||
$expectedFilePathWithContent = $expectedAddedFileWithContents[$key];
|
||||
/**
|
||||
* use relative path against _temp_fixture_easy_testing
|
||||
* to make work in all OSs, for example:
|
||||
* In MacOS, the realpath() of sys_get_temp_dir() pointed to /private/var/* which symlinked of /var/*
|
||||
*/
|
||||
[, $expectedFilePathWithContentFilePath] = \explode(FixtureTempFileDumper::TEMP_FIXTURE_DIRECTORY, $expectedFilePathWithContent->getFilePath());
|
||||
[, $addedFilePathWithContentFilePath] = \explode(FixtureTempFileDumper::TEMP_FIXTURE_DIRECTORY, $addedFilePathWithContent->getFilePath());
|
||||
$this->assertSame($expectedFilePathWithContentFilePath, $addedFilePathWithContentFilePath);
|
||||
$this->assertSame($expectedFilePathWithContent->getFileContent(), $addedFilePathWithContent->getFileContent());
|
||||
$wasFound = \false;
|
||||
foreach ($addedFilePathsWithContents as $addedFilePathsWithContent) {
|
||||
if ($addedFilePathsWithContent->getFilePath() !== $expectedFilePath) {
|
||||
continue;
|
||||
}
|
||||
$this->assertSame($expectedFileContents, $addedFilePathsWithContent->getFileContent());
|
||||
$wasFound = \true;
|
||||
}
|
||||
if ($wasFound === \false) {
|
||||
$this->fail(\sprintf('File "%s" was not added', $expectedFilePath));
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -57,9 +42,9 @@ trait MovingFilesTrait
|
|||
if ($addedFilesWithNodes === []) {
|
||||
return $addedFilePathsWithContents;
|
||||
}
|
||||
foreach ($addedFilesWithNodes as $addedFileWithNode) {
|
||||
$fileContent = $nodesWithFileDestinationPrinter->printNodesWithFileDestination($addedFileWithNode);
|
||||
$addedFilePathsWithContents[] = new AddedFileWithContent($addedFileWithNode->getFilePath(), $fileContent);
|
||||
foreach ($addedFilesWithNodes as $addedFileWithNodes) {
|
||||
$fileContent = $nodesWithFileDestinationPrinter->printNodesWithFileDestination($addedFileWithNodes);
|
||||
$addedFilePathsWithContents[] = new AddedFileWithContent($addedFileWithNodes->getFilePath(), $fileContent);
|
||||
}
|
||||
return $addedFilePathsWithContents;
|
||||
}
|
||||
|
|
|
@ -3,44 +3,18 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\FileInfoAnalyzer;
|
||||
|
||||
use RectorPrefix202302\Nette\Utils\Strings;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt\ClassLike;
|
||||
use Rector\CodingStyle\Naming\ClassNaming;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
final class FileInfoDeletionAnalyzer
|
||||
{
|
||||
/**
|
||||
* @see https://regex101.com/r/8BdrI3/1
|
||||
* @var string
|
||||
*/
|
||||
private const TESTING_PREFIX_REGEX = '#input_(.*?)_#';
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\CodingStyle\Naming\ClassNaming
|
||||
*/
|
||||
private $classNaming;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
public function __construct(ClassNaming $classNaming, NodeNameResolver $nodeNameResolver)
|
||||
{
|
||||
$this->classNaming = $classNaming;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
public function isClassLikeAndFileInfoMatch(File $file, ClassLike $classLike) : bool
|
||||
{
|
||||
$className = (string) $this->nodeNameResolver->getName($classLike);
|
||||
$filePath = $file->getFilePath();
|
||||
$basename = \pathinfo($filePath, \PATHINFO_BASENAME);
|
||||
$baseFileName = $this->clearNameFromTestingPrefix($basename);
|
||||
$classShortName = $this->classNaming->getShortName($className);
|
||||
return $baseFileName === $classShortName;
|
||||
}
|
||||
private function clearNameFromTestingPrefix(string $name) : string
|
||||
{
|
||||
return Strings::replace($name, self::TESTING_PREFIX_REGEX);
|
||||
if (!$classLike->name instanceof Identifier) {
|
||||
return \false;
|
||||
}
|
||||
$classShortName = $classLike->name->toString();
|
||||
$baseFilename = \pathinfo($file->getFilePath(), \PATHINFO_FILENAME);
|
||||
return $baseFilename === $classShortName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,13 +114,13 @@ CODE_SAMPLE
|
|||
$nodeToReturn = $this->refactorFileWithoutNamespace($node);
|
||||
}
|
||||
// 1. remove this node
|
||||
if ($nodeToReturn !== null) {
|
||||
if ($nodeToReturn instanceof Node) {
|
||||
return $nodeToReturn;
|
||||
}
|
||||
$isInaddedFiles = \array_filter($this->removedAndAddedFilesCollector->getAddedFilesWithContent(), function (AddedFileWithContent $addedFileWithContent) : bool {
|
||||
$isInAddedFiles = (bool) \array_filter($this->removedAndAddedFilesCollector->getAddedFilesWithContent(), function (AddedFileWithContent $addedFileWithContent) : bool {
|
||||
return $addedFileWithContent->getFilePath() === $this->file->getFilePath();
|
||||
});
|
||||
if ($isInaddedFiles === []) {
|
||||
if ($isInAddedFiles === \false) {
|
||||
// 2. nothing to return - remove the file
|
||||
$this->removedAndAddedFilesCollector->removeFile($this->file->getFilePath());
|
||||
}
|
||||
|
@ -144,7 +144,6 @@ CODE_SAMPLE
|
|||
$nodeToReturn = $newNamespace;
|
||||
continue;
|
||||
}
|
||||
// 2. new file
|
||||
$this->printNewNodes($classLike, $newNamespace);
|
||||
}
|
||||
return $nodeToReturn;
|
||||
|
|
|
@ -116,19 +116,19 @@ final class ApplicationFileProcessor
|
|||
*/
|
||||
public function run(Configuration $configuration, InputInterface $input) : array
|
||||
{
|
||||
$fileInfos = $this->fileFactory->createFileInfosFromPaths($configuration->getPaths(), $configuration);
|
||||
$filePaths = $this->fileFactory->findFilesInPaths($configuration->getPaths(), $configuration);
|
||||
// no files found
|
||||
if ($fileInfos === []) {
|
||||
if ($filePaths === []) {
|
||||
return [Bridge::SYSTEM_ERRORS => [], Bridge::FILE_DIFFS => []];
|
||||
}
|
||||
$this->configureCustomErrorHandler();
|
||||
if ($configuration->isParallel()) {
|
||||
$systemErrorsAndFileDiffs = $this->runParallel($fileInfos, $configuration, $input);
|
||||
$systemErrorsAndFileDiffs = $this->runParallel($filePaths, $configuration, $input);
|
||||
} else {
|
||||
// 1. collect all files from files+dirs provided paths
|
||||
$files = $this->fileFactory->createFromPaths($fileInfos);
|
||||
$files = $this->fileFactory->createFromPaths($filePaths);
|
||||
// 2. PHPStan has to know about all files too
|
||||
$this->configurePHPStanNodeScopeResolver($fileInfos);
|
||||
$this->configurePHPStanNodeScopeResolver($filePaths);
|
||||
$systemErrorsAndFileDiffs = $this->processFiles($files, $configuration);
|
||||
$this->fileDiffFileDecorator->decorate($files);
|
||||
$this->printFiles($files, $configuration);
|
||||
|
|
|
@ -35,9 +35,6 @@ final class RemovedAndAddedFilesCollector
|
|||
}
|
||||
public function isFileRemoved(string $filePath) : bool
|
||||
{
|
||||
// early assign to variable for increase performance
|
||||
// @see https://3v4l.org/FM3vY#focus=8.0.7 vs https://3v4l.org/JZW7b#focus=8.0.7
|
||||
// $pathname = $filePath->getPathname();
|
||||
foreach ($this->removedFilePaths as $removedFilePath) {
|
||||
if ($removedFilePath !== $filePath) {
|
||||
continue;
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '256571c01e578d24fedb69a4aa74bcc5569f2357';
|
||||
public const PACKAGE_VERSION = 'b17d4a39222960783a78207f24d404d8dbc97eab';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-02-06 11:57:01';
|
||||
public const RELEASE_DATE = '2023-02-06 14:19:29';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ final class FileFactory
|
|||
* @param string[] $paths
|
||||
* @return string[]
|
||||
*/
|
||||
public function createFileInfosFromPaths(array $paths, Configuration $configuration) : array
|
||||
public function findFilesInPaths(array $paths, Configuration $configuration) : array
|
||||
{
|
||||
if ($configuration->shouldClearCache()) {
|
||||
$this->changedFilesDetector->clear();
|
||||
|
|
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit49e283f12a22abc1b1ba43d26d8542ff::getLoader();
|
||||
return ComposerAutoloaderInitb1122a82977d2be029b595c7fc7d9cfa::getLoader();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit49e283f12a22abc1b1ba43d26d8542ff
|
||||
class ComposerAutoloaderInitb1122a82977d2be029b595c7fc7d9cfa
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit49e283f12a22abc1b1ba43d26d8542ff
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit49e283f12a22abc1b1ba43d26d8542ff', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitb1122a82977d2be029b595c7fc7d9cfa', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit49e283f12a22abc1b1ba43d26d8542ff', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitb1122a82977d2be029b595c7fc7d9cfa', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff
|
||||
class ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3086,9 +3086,9 @@ class ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit49e283f12a22abc1b1ba43d26d8542ff::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitb1122a82977d2be029b595c7fc7d9cfa::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
|
@ -2128,12 +2128,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "dabd988a91b3d0f40386468166a8d6aee55ac859"
|
||||
"reference": "cd25b6a2f5bb116c65ef7395f5d0e416b2498423"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/dabd988a91b3d0f40386468166a8d6aee55ac859",
|
||||
"reference": "dabd988a91b3d0f40386468166a8d6aee55ac859",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/cd25b6a2f5bb116c65ef7395f5d0e416b2498423",
|
||||
"reference": "cd25b6a2f5bb116c65ef7395f5d0e416b2498423",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2164,7 +2164,7 @@
|
|||
"tomasvotruba\/type-coverage": "^0.0.9",
|
||||
"tomasvotruba\/unused-public": "^0.0.34"
|
||||
},
|
||||
"time": "2023-02-04T13:47:16+00:00",
|
||||
"time": "2023-02-06T12:52:12+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
@ -2188,7 +2188,7 @@
|
|||
"description": "Rector upgrades rules for Symfony Framework",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues",
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/main"
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.14.3"
|
||||
},
|
||||
"install-path": "..\/rector\/rector-symfony"
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ea9cf46'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 46346e2'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9639ef9'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 4942538'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main dabd988'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ea9cf46'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 46346e2'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9639ef9'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 4942538'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main cd25b6a'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue