mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-14 12:32:00 +02:00
Updated Rector to commit 5a3a59c50c7810296274eb4408737c8f2f8921e7
5a3a59c50c
Remove collectors, as performance very costly and not practically useful (#5470)
This commit is contained in:
parent
e24202f0b6
commit
ec3d78eef4
@ -13,7 +13,6 @@ return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->autoloadPaths([]);
|
||||
$rectorConfig->bootstrapFiles([]);
|
||||
$rectorConfig->parallel();
|
||||
$rectorConfig->disableCollectors();
|
||||
// to avoid autoimporting out of the box
|
||||
$rectorConfig->importNames(\false, \false);
|
||||
$rectorConfig->removeUnusedImports(\false);
|
||||
|
@ -1,127 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Privatization\Rector\Class_;
|
||||
|
||||
use RectorPrefix202401\Nette\Utils\Arrays;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Node\CollectedDataNode;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Collector\ParentClassCollector;
|
||||
use Rector\NodeAnalyzer\ClassAnalyzer;
|
||||
use Rector\NodeAnalyzer\DoctrineEntityAnalyzer;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Privatization\NodeManipulator\VisibilityManipulator;
|
||||
use Rector\Rector\AbstractCollectorRector;
|
||||
use Rector\Reflection\ReflectionResolver;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenCollectorRector\FinalizeClassesWithoutChildrenCollectorRectorTest
|
||||
*/
|
||||
final class FinalizeClassesWithoutChildrenCollectorRector extends AbstractCollectorRector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeAnalyzer\ClassAnalyzer
|
||||
*/
|
||||
private $classAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Privatization\NodeManipulator\VisibilityManipulator
|
||||
*/
|
||||
private $visibilityManipulator;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeAnalyzer\DoctrineEntityAnalyzer
|
||||
*/
|
||||
private $doctrineEntityAnalyzer;
|
||||
public function __construct(ClassAnalyzer $classAnalyzer, VisibilityManipulator $visibilityManipulator, ReflectionResolver $reflectionResolver, DoctrineEntityAnalyzer $doctrineEntityAnalyzer)
|
||||
{
|
||||
$this->classAnalyzer = $classAnalyzer;
|
||||
$this->visibilityManipulator = $visibilityManipulator;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->doctrineEntityAnalyzer = $doctrineEntityAnalyzer;
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Class_::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
{
|
||||
if ($this->shouldSkipClass($node)) {
|
||||
return null;
|
||||
}
|
||||
if ($this->doctrineEntityAnalyzer->hasClassAnnotation($node)) {
|
||||
return null;
|
||||
}
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
if ($this->doctrineEntityAnalyzer->hasClassReflectionAttribute($classReflection)) {
|
||||
return null;
|
||||
}
|
||||
$parentClassNames = $this->resolveCollectedParentClassNames($this->getCollectedDataNode());
|
||||
// the class is being extended in the code, so we should skip it here
|
||||
if ($this->nodeNameResolver->isNames($node, $parentClassNames)) {
|
||||
return null;
|
||||
}
|
||||
if ($node->attrGroups !== []) {
|
||||
// improve reprint with correct newline
|
||||
$node->setAttribute(AttributeKey::ORIGINAL_NODE, null);
|
||||
}
|
||||
$this->visibilityManipulator->makeFinal($node);
|
||||
return $node;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Finalize classes without children using collectors', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
class FirstClass extends SecondClass
|
||||
{
|
||||
}
|
||||
|
||||
class SecondClass
|
||||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
final class FirstClass extends SecondClass
|
||||
{
|
||||
}
|
||||
|
||||
class SecondClass
|
||||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
private function shouldSkipClass(Class_ $class) : bool
|
||||
{
|
||||
if ($class->isFinal() || $class->isAbstract()) {
|
||||
return \true;
|
||||
}
|
||||
return $this->classAnalyzer->isAnonymousClass($class);
|
||||
}
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
private function resolveCollectedParentClassNames(CollectedDataNode $collectedDataNode) : array
|
||||
{
|
||||
$parentClassCollectorData = $collectedDataNode->get(ParentClassCollector::class);
|
||||
$parentClassNames = Arrays::flatten($parentClassCollectorData);
|
||||
return \array_unique($parentClassNames);
|
||||
}
|
||||
}
|
@ -156,7 +156,6 @@ final class ApplicationFileProcessor
|
||||
if ($currentFileDiff instanceof FileDiff) {
|
||||
$fileDiffs[] = $currentFileDiff;
|
||||
}
|
||||
$collectedData = \array_merge($collectedData, $fileProcessResult->getCollectedData());
|
||||
// progress bar on parallel handled on runParallel()
|
||||
if (\is_callable($postFileCallback)) {
|
||||
$postFileCallback(1);
|
||||
|
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Application\Collector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Collectors\CollectedData;
|
||||
use PHPStan\Collectors\Registry;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Throwable;
|
||||
/**
|
||||
* @see Mimics https://github.com/phpstan/phpstan-src/commit/bccd1cd58e0d117ac8755ab228e338d966cac25a
|
||||
*/
|
||||
final class CollectorNodeVisitor extends NodeVisitorAbstract
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \PHPStan\Collectors\Registry
|
||||
*/
|
||||
private $collectorRegistry;
|
||||
/**
|
||||
* @var CollectedData[]
|
||||
*/
|
||||
private $collectedDatas = [];
|
||||
public function __construct(Registry $collectorRegistry)
|
||||
{
|
||||
$this->collectorRegistry = $collectorRegistry;
|
||||
}
|
||||
/**
|
||||
* @param Node[] $nodes
|
||||
*/
|
||||
public function beforeTraverse(array $nodes) : ?array
|
||||
{
|
||||
$this->collectedDatas = [];
|
||||
return null;
|
||||
}
|
||||
public function enterNode(Node $node)
|
||||
{
|
||||
$collectors = $this->collectorRegistry->getCollectors(\get_class($node));
|
||||
/** @var Scope $scope */
|
||||
$scope = $node->getAttribute(AttributeKey::SCOPE);
|
||||
foreach ($collectors as $collector) {
|
||||
try {
|
||||
$collectedData = $collector->processNode($node, $scope);
|
||||
} catch (Throwable $exception) {
|
||||
// nothing to collect
|
||||
continue;
|
||||
}
|
||||
// no data collected
|
||||
if ($collectedData === null) {
|
||||
continue;
|
||||
}
|
||||
$this->collectedDatas[] = new CollectedData($collectedData, $scope->getFile(), \get_class($collector));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @return CollectedData[]
|
||||
*/
|
||||
public function getCollectedData() : array
|
||||
{
|
||||
return $this->collectedDatas;
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Application\Collector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PHPStan\Collectors\CollectedData;
|
||||
use PHPStan\Collectors\Registry;
|
||||
final class CollectorProcessor
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \PhpParser\NodeTraverser
|
||||
*/
|
||||
private $nodeTraverser;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Application\Collector\CollectorNodeVisitor
|
||||
*/
|
||||
private $collectorNodeVisitor;
|
||||
public function __construct(Registry $collectorRegistry)
|
||||
{
|
||||
$nodeTraverser = new NodeTraverser();
|
||||
$this->collectorNodeVisitor = new \Rector\Application\Collector\CollectorNodeVisitor($collectorRegistry);
|
||||
$nodeTraverser->addVisitor($this->collectorNodeVisitor);
|
||||
$this->nodeTraverser = $nodeTraverser;
|
||||
}
|
||||
/**
|
||||
* @param Node[] $stmts
|
||||
* @return CollectedData[]
|
||||
*/
|
||||
public function process(array $stmts) : array
|
||||
{
|
||||
$this->nodeTraverser->traverse($stmts);
|
||||
return $this->collectorNodeVisitor->getCollectedData();
|
||||
}
|
||||
}
|
@ -4,7 +4,6 @@ declare (strict_types=1);
|
||||
namespace Rector\Application;
|
||||
|
||||
use PHPStan\AnalysedCodeException;
|
||||
use Rector\Application\Collector\CollectorProcessor;
|
||||
use Rector\Caching\Detector\ChangedFilesDetector;
|
||||
use Rector\ChangesReporting\ValueObjectFactory\ErrorFactory;
|
||||
use Rector\ChangesReporting\ValueObjectFactory\FileDiffFactory;
|
||||
@ -61,11 +60,6 @@ final class FileProcessor
|
||||
* @var \Rector\FileSystem\FilePathHelper
|
||||
*/
|
||||
private $filePathHelper;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Application\Collector\CollectorProcessor
|
||||
*/
|
||||
private $collectorProcessor;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PostRector\Application\PostFileProcessor
|
||||
@ -81,7 +75,7 @@ final class FileProcessor
|
||||
* @var \Rector\NodeTypeResolver\NodeScopeAndMetadataDecorator
|
||||
*/
|
||||
private $nodeScopeAndMetadataDecorator;
|
||||
public function __construct(FormatPerservingPrinter $formatPerservingPrinter, RectorNodeTraverser $rectorNodeTraverser, SymfonyStyle $symfonyStyle, FileDiffFactory $fileDiffFactory, ChangedFilesDetector $changedFilesDetector, ErrorFactory $errorFactory, FilePathHelper $filePathHelper, CollectorProcessor $collectorProcessor, PostFileProcessor $postFileProcessor, RectorParser $rectorParser, NodeScopeAndMetadataDecorator $nodeScopeAndMetadataDecorator)
|
||||
public function __construct(FormatPerservingPrinter $formatPerservingPrinter, RectorNodeTraverser $rectorNodeTraverser, SymfonyStyle $symfonyStyle, FileDiffFactory $fileDiffFactory, ChangedFilesDetector $changedFilesDetector, ErrorFactory $errorFactory, FilePathHelper $filePathHelper, PostFileProcessor $postFileProcessor, RectorParser $rectorParser, NodeScopeAndMetadataDecorator $nodeScopeAndMetadataDecorator)
|
||||
{
|
||||
$this->formatPerservingPrinter = $formatPerservingPrinter;
|
||||
$this->rectorNodeTraverser = $rectorNodeTraverser;
|
||||
@ -90,22 +84,17 @@ final class FileProcessor
|
||||
$this->changedFilesDetector = $changedFilesDetector;
|
||||
$this->errorFactory = $errorFactory;
|
||||
$this->filePathHelper = $filePathHelper;
|
||||
$this->collectorProcessor = $collectorProcessor;
|
||||
$this->postFileProcessor = $postFileProcessor;
|
||||
$this->rectorParser = $rectorParser;
|
||||
$this->nodeScopeAndMetadataDecorator = $nodeScopeAndMetadataDecorator;
|
||||
}
|
||||
public function processFile(File $file, Configuration $configuration) : FileProcessResult
|
||||
{
|
||||
if ($configuration->isSecondRun() && $configuration->isCollectors()) {
|
||||
// 2nd run
|
||||
$this->rectorNodeTraverser->prepareCollectorRectorsRun($configuration);
|
||||
}
|
||||
// 1. parse files to nodes
|
||||
$parsingSystemError = $this->parseFileAndDecorateNodes($file);
|
||||
if ($parsingSystemError instanceof SystemError) {
|
||||
// we cannot process this file as the parsing and type resolving itself went wrong
|
||||
return new FileProcessResult([$parsingSystemError], null, []);
|
||||
return new FileProcessResult([$parsingSystemError], null);
|
||||
}
|
||||
$fileHasChanged = \false;
|
||||
$filePath = $file->getFilePath();
|
||||
@ -114,8 +103,6 @@ final class FileProcessor
|
||||
do {
|
||||
$file->changeHasChanged(\false);
|
||||
$newStmts = $this->rectorNodeTraverser->traverse($file->getNewStmts());
|
||||
// collect data
|
||||
$fileCollectedData = $configuration->isCollectors() ? $this->collectorProcessor->process($newStmts) : [];
|
||||
// apply post rectors
|
||||
$postNewStmts = $this->postFileProcessor->traverse($newStmts, $filePath);
|
||||
// this is needed for new tokens added in "afterTraverse()"
|
||||
@ -138,7 +125,7 @@ final class FileProcessor
|
||||
$currentFileDiff = $this->fileDiffFactory->createFileDiffWithLineChanges($file, $file->getOriginalFileContent(), $file->getFileContent(), $rectorWithLineChanges);
|
||||
$file->setFileDiff($currentFileDiff);
|
||||
}
|
||||
return new FileProcessResult([], $file->getFileDiff(), $fileCollectedData);
|
||||
return new FileProcessResult([], $file->getFileDiff());
|
||||
}
|
||||
private function parseFileAndDecorateNodes(File $file) : ?SystemError
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '34ab8dc0f9a7e8b7cfa1a88cdf36ced9020964f8';
|
||||
public const PACKAGE_VERSION = '5a3a59c50c7810296274eb4408737c8f2f8921e7';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-01-16 03:17:08';
|
||||
public const RELEASE_DATE = '2024-01-15 23:08:35';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Collector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Collectors\Collector;
|
||||
use PHPStan\Type\Constant\ConstantStringType;
|
||||
/**
|
||||
* @implements Collector<MethodCall, string[]|null>
|
||||
*/
|
||||
final class MockedClassCollector implements Collector
|
||||
{
|
||||
public function getNodeType() : string
|
||||
{
|
||||
return MethodCall::class;
|
||||
}
|
||||
/**
|
||||
* @param MethodCall $node
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function processNode(Node $node, Scope $scope) : ?array
|
||||
{
|
||||
if (!$node->name instanceof Identifier) {
|
||||
return null;
|
||||
}
|
||||
$methodName = $node->name->toString();
|
||||
if (!\in_array($methodName, ['createMock', 'buildMock'], \true)) {
|
||||
return null;
|
||||
}
|
||||
$firstArg = $node->getArgs()[0] ?? null;
|
||||
if (!$firstArg instanceof Arg) {
|
||||
return null;
|
||||
}
|
||||
$mockedClassType = $scope->getType($firstArg->value);
|
||||
if (!$mockedClassType instanceof ConstantStringType) {
|
||||
return null;
|
||||
}
|
||||
return [$mockedClassType->getValue()];
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Collector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Collectors\Collector;
|
||||
/**
|
||||
* @implements Collector<Class_, string[]|null>
|
||||
*/
|
||||
final class ParentClassCollector implements Collector
|
||||
{
|
||||
public function getNodeType() : string
|
||||
{
|
||||
return Class_::class;
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function processNode(Node $node, Scope $scope) : ?array
|
||||
{
|
||||
if (!$node->extends instanceof Name) {
|
||||
return null;
|
||||
}
|
||||
return [$node->extends->toString()];
|
||||
}
|
||||
}
|
@ -64,13 +64,6 @@ final class RectorConfig extends Container
|
||||
{
|
||||
SimpleParameterProvider::setParameter(Option::PARALLEL, \false);
|
||||
}
|
||||
/**
|
||||
* @experimental since Rector 0.18.x
|
||||
*/
|
||||
public function enableCollectors() : void
|
||||
{
|
||||
SimpleParameterProvider::setParameter(Option::COLLECTORS, \true);
|
||||
}
|
||||
/**
|
||||
* Defaults in sync with https://phpstan.org/config-reference#parallel-processing
|
||||
* as we run PHPStan as well
|
||||
@ -180,8 +173,7 @@ final class RectorConfig extends Container
|
||||
*/
|
||||
public function collector(string $collectorClass) : void
|
||||
{
|
||||
$this->singleton($collectorClass);
|
||||
$this->tag($collectorClass, Collector::class);
|
||||
\trigger_error('collector have been deprecated as performance costly and not valuable');
|
||||
}
|
||||
/**
|
||||
* @param class-string<Command> $commandClass
|
||||
@ -312,13 +304,6 @@ final class RectorConfig extends Container
|
||||
ContainerMemento::forgetService($this, $skippedClass);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @experimental since Rector 0.18.x
|
||||
*/
|
||||
public function disableCollectors() : void
|
||||
{
|
||||
SimpleParameterProvider::setParameter(Option::COLLECTORS, \false);
|
||||
}
|
||||
/**
|
||||
* @internal Use to add tag on service registrations
|
||||
*/
|
||||
|
@ -29,8 +29,7 @@ final class ConfigurationFactory
|
||||
public function createForTests(array $paths) : Configuration
|
||||
{
|
||||
$fileExtensions = SimpleParameterProvider::provideArrayParameter(\Rector\Configuration\Option::FILE_EXTENSIONS);
|
||||
$isCollectors = SimpleParameterProvider::provideBoolParameter(\Rector\Configuration\Option::COLLECTORS, \false);
|
||||
return new Configuration(\false, \true, \false, ConsoleOutputFormatter::NAME, $fileExtensions, $paths, \true, null, null, \false, null, \false, $isCollectors);
|
||||
return new Configuration(\false, \true, \false, ConsoleOutputFormatter::NAME, $fileExtensions, $paths, \true, null, null, \false, null, \false);
|
||||
}
|
||||
/**
|
||||
* Needs to run in the start of the life cycle, since the rest of workflow uses it.
|
||||
@ -49,8 +48,7 @@ final class ConfigurationFactory
|
||||
$parallelIdentifier = (string) $input->getOption(\Rector\Configuration\Option::PARALLEL_IDENTIFIER);
|
||||
$isDebug = (bool) $input->getOption(\Rector\Configuration\Option::DEBUG);
|
||||
$memoryLimit = $this->resolveMemoryLimit($input);
|
||||
$isCollectors = SimpleParameterProvider::provideBoolParameter(\Rector\Configuration\Option::COLLECTORS);
|
||||
return new Configuration($isDryRun, $showProgressBar, $shouldClearCache, $outputFormat, $fileExtensions, $paths, $showDiffs, $parallelPort, $parallelIdentifier, $isParallel, $memoryLimit, $isDebug, $isCollectors);
|
||||
return new Configuration($isDryRun, $showProgressBar, $shouldClearCache, $outputFormat, $fileExtensions, $paths, $showDiffs, $parallelPort, $parallelIdentifier, $isParallel, $memoryLimit, $isDebug);
|
||||
}
|
||||
private function shouldShowProgressBar(InputInterface $input, string $outputFormat) : bool
|
||||
{
|
||||
|
@ -195,9 +195,4 @@ final class Option
|
||||
* @var string
|
||||
*/
|
||||
public const REGISTERED_RECTOR_SETS = 'registered_rector_sets';
|
||||
/**
|
||||
* @internal
|
||||
* @var string
|
||||
*/
|
||||
public const COLLECTORS = 'collectors';
|
||||
}
|
||||
|
@ -115,21 +115,8 @@ final class ProcessCommand extends Command
|
||||
// MAIN PHASE
|
||||
// 2. run Rector
|
||||
$processResult = $this->applicationFileProcessor->run($configuration, $input);
|
||||
// 3. collectors phase
|
||||
if ($processResult->getCollectedData() !== []) {
|
||||
$this->symfonyStyle->newLine(2);
|
||||
$this->symfonyStyle->title('Running 2nd time with collectors data');
|
||||
$configuration->setCollectedData($processResult->getCollectedData());
|
||||
$configuration->enableSecondRun();
|
||||
// reset rules in Rector traverser
|
||||
$nextProcessResult = $this->applicationFileProcessor->run($configuration, $input);
|
||||
// @todo merge results here
|
||||
$this->symfonyStyle->newLine(3);
|
||||
// unset all rectors that are not collector
|
||||
// set new collector rectors - have a custom tag? yes
|
||||
}
|
||||
// REPORTING PHASE
|
||||
// 4. reporting phaseRunning 2nd time with collectors data
|
||||
// 3. reporting phaseRunning 2nd time with collectors data
|
||||
// report diffs and errors
|
||||
$outputFormat = $configuration->getOutputFormat();
|
||||
$outputFormatter = $this->outputFormatterCollector->getByName($outputFormat);
|
||||
|
@ -9,8 +9,6 @@ use RectorPrefix202401\Illuminate\Container\Container;
|
||||
use PhpParser\Lexer;
|
||||
use PHPStan\Analyser\NodeScopeResolver;
|
||||
use PHPStan\Analyser\ScopeFactory;
|
||||
use PHPStan\Collectors\Collector;
|
||||
use PHPStan\Collectors\Registry;
|
||||
use PHPStan\File\FileHelper;
|
||||
use PHPStan\Parser\Parser;
|
||||
use PHPStan\PhpDoc\TypeNodeResolver;
|
||||
@ -47,7 +45,6 @@ use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipVoter\ClassLikeNameCla
|
||||
use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipVoter\FullyQualifiedNameClassNameImportSkipVoter;
|
||||
use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipVoter\UsesClassNameImportSkipVoter;
|
||||
use Rector\CodingStyle\Contract\ClassNameImport\ClassNameImportSkipVoterInterface;
|
||||
use Rector\Collector\ParentClassCollector;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Configuration\ConfigInitializer;
|
||||
use Rector\Configuration\RenamedClassesDataCollector;
|
||||
@ -243,10 +240,6 @@ final class LazyContainerFactory
|
||||
{
|
||||
$rectorConfig = new RectorConfig();
|
||||
$rectorConfig->import(__DIR__ . '/../../config/config.php');
|
||||
// rector collectors
|
||||
$rectorConfig->when(Registry::class)->needs('$collectors')->giveTagged(Collector::class);
|
||||
// @todo collectors - just for testing purpose
|
||||
$rectorConfig->collector(ParentClassCollector::class);
|
||||
$rectorConfig->singleton(Application::class, static function (Container $container) : Application {
|
||||
$application = $container->make(ConsoleApplication::class);
|
||||
$commandNamesToHide = ['list', 'completion', 'help', 'worker'];
|
||||
|
@ -5,10 +5,8 @@ namespace Rector\PhpParser\NodeTraverser;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PHPStan\Node\CollectedDataNode;
|
||||
use Rector\Contract\Rector\CollectorRectorInterface;
|
||||
use Rector\Contract\Rector\RectorInterface;
|
||||
use Rector\ValueObject\Configuration;
|
||||
use Rector\VersionBonding\PhpVersionedFilter;
|
||||
final class RectorNodeTraverser extends NodeTraverser
|
||||
{
|
||||
@ -16,10 +14,6 @@ final class RectorNodeTraverser extends NodeTraverser
|
||||
* @var RectorInterface[]
|
||||
*/
|
||||
private $rectors;
|
||||
/**
|
||||
* @var CollectorRectorInterface[]
|
||||
*/
|
||||
private $collectorRectors;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\VersionBonding\PhpVersionedFilter
|
||||
@ -31,12 +25,10 @@ final class RectorNodeTraverser extends NodeTraverser
|
||||
private $areNodeVisitorsPrepared = \false;
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
* @param CollectorRectorInterface[] $collectorRectors
|
||||
*/
|
||||
public function __construct(array $rectors, array $collectorRectors, PhpVersionedFilter $phpVersionedFilter)
|
||||
public function __construct(array $rectors, PhpVersionedFilter $phpVersionedFilter)
|
||||
{
|
||||
$this->rectors = $rectors;
|
||||
$this->collectorRectors = $collectorRectors;
|
||||
$this->phpVersionedFilter = $phpVersionedFilter;
|
||||
parent::__construct();
|
||||
}
|
||||
@ -59,19 +51,6 @@ final class RectorNodeTraverser extends NodeTraverser
|
||||
$this->visitors = [];
|
||||
$this->areNodeVisitorsPrepared = \false;
|
||||
}
|
||||
public function prepareCollectorRectorsRun(Configuration $configuration) : void
|
||||
{
|
||||
if ($this->collectorRectors === []) {
|
||||
return;
|
||||
}
|
||||
$collectedDataNode = new CollectedDataNode($configuration->getCollectedData(), \false);
|
||||
// hydrate abstract collector rector with configuration
|
||||
foreach ($this->collectorRectors as $collectorRector) {
|
||||
$collectorRector->setCollectedDataNode($collectedDataNode);
|
||||
}
|
||||
$this->visitors = $this->collectorRectors;
|
||||
$this->areNodeVisitorsPrepared = \true;
|
||||
}
|
||||
/**
|
||||
* This must happen after $this->configuration is set after ProcessCommand::execute() is run,
|
||||
* otherwise we get default false positives.
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Rector;
|
||||
|
||||
use PHPStan\Node\CollectedDataNode;
|
||||
use Rector\Contract\Rector\CollectorRectorInterface;
|
||||
use Rector\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix202401\Webmozart\Assert\Assert;
|
||||
abstract class AbstractCollectorRector extends \Rector\Rector\AbstractRector implements CollectorRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var \PHPStan\Node\CollectedDataNode|null
|
||||
*/
|
||||
private $collectedDataNode;
|
||||
/**
|
||||
* @api used via optional contract
|
||||
*/
|
||||
public function setCollectedDataNode(CollectedDataNode $collectedDataNode) : void
|
||||
{
|
||||
Assert::isAOf(static::class, CollectorRectorInterface::class);
|
||||
$this->collectedDataNode = $collectedDataNode;
|
||||
}
|
||||
public function getCollectedDataNode() : CollectedDataNode
|
||||
{
|
||||
if (!$this->collectedDataNode instanceof CollectedDataNode) {
|
||||
throw new ShouldNotHappenException('CollectedDataNode is not set');
|
||||
}
|
||||
// this should be called only from CollectorRectorInterface
|
||||
return $this->collectedDataNode;
|
||||
}
|
||||
}
|
@ -61,7 +61,6 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractLa
|
||||
SimpleParameterProvider::setParameter(Option::IMPORT_SHORT_CLASSES, \true);
|
||||
SimpleParameterProvider::setParameter(Option::INDENT_CHAR, ' ');
|
||||
SimpleParameterProvider::setParameter(Option::INDENT_SIZE, 4);
|
||||
SimpleParameterProvider::setParameter(Option::COLLECTORS, \false);
|
||||
SimpleParameterProvider::setParameter(Option::POLYFILL_PACKAGES, []);
|
||||
}
|
||||
protected function setUp() : void
|
||||
@ -212,14 +211,6 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractLa
|
||||
$configurationFactory = $this->make(ConfigurationFactory::class);
|
||||
$configuration = $configurationFactory->createForTests([$filePath]);
|
||||
$processResult = $this->applicationFileProcessor->processFiles([$filePath], $configuration);
|
||||
if ($processResult->getCollectedData() !== [] && $configuration->isCollectors()) {
|
||||
// second run with collected data
|
||||
$configuration->setCollectedData($processResult->getCollectedData());
|
||||
$configuration->enableSecondRun();
|
||||
$rectorNodeTraverser = $this->make(RectorNodeTraverser::class);
|
||||
$rectorNodeTraverser->prepareCollectorRectorsRun($configuration);
|
||||
$this->applicationFileProcessor->processFiles([$filePath], $configuration);
|
||||
}
|
||||
// return changed file contents
|
||||
$changedFileContents = FileSystem::read($filePath);
|
||||
return new RectorTestResult($changedFileContents, $processResult);
|
||||
|
@ -68,11 +68,6 @@ final class Configuration
|
||||
* @var bool
|
||||
*/
|
||||
private $isDebug = \false;
|
||||
/**
|
||||
* @readonly
|
||||
* @var bool
|
||||
*/
|
||||
private $isCollectors = \false;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@ -85,7 +80,7 @@ final class Configuration
|
||||
* @param string[] $fileExtensions
|
||||
* @param string[] $paths
|
||||
*/
|
||||
public function __construct(bool $isDryRun = \false, bool $showProgressBar = \true, bool $shouldClearCache = \false, string $outputFormat = ConsoleOutputFormatter::NAME, array $fileExtensions = ['php'], array $paths = [], bool $showDiffs = \true, ?string $parallelPort = null, ?string $parallelIdentifier = null, bool $isParallel = \false, ?string $memoryLimit = null, bool $isDebug = \false, bool $isCollectors = \false)
|
||||
public function __construct(bool $isDryRun = \false, bool $showProgressBar = \true, bool $shouldClearCache = \false, string $outputFormat = ConsoleOutputFormatter::NAME, array $fileExtensions = ['php'], array $paths = [], bool $showDiffs = \true, ?string $parallelPort = null, ?string $parallelIdentifier = null, bool $isParallel = \false, ?string $memoryLimit = null, bool $isDebug = \false)
|
||||
{
|
||||
$this->isDryRun = $isDryRun;
|
||||
$this->showProgressBar = $showProgressBar;
|
||||
@ -99,7 +94,6 @@ final class Configuration
|
||||
$this->isParallel = $isParallel;
|
||||
$this->memoryLimit = $memoryLimit;
|
||||
$this->isDebug = $isDebug;
|
||||
$this->isCollectors = $isCollectors;
|
||||
}
|
||||
public function isDryRun() : bool
|
||||
{
|
||||
@ -191,11 +185,4 @@ final class Configuration
|
||||
{
|
||||
$this->isSecondRun = \false;
|
||||
}
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function isCollectors() : bool
|
||||
{
|
||||
return $this->isCollectors;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ValueObject;
|
||||
|
||||
use PHPStan\Collectors\CollectedData;
|
||||
use Rector\ValueObject\Error\SystemError;
|
||||
use Rector\ValueObject\Reporting\FileDiff;
|
||||
use RectorPrefix202401\Webmozart\Assert\Assert;
|
||||
@ -19,22 +18,14 @@ final class FileProcessResult
|
||||
* @var \Rector\ValueObject\Reporting\FileDiff|null
|
||||
*/
|
||||
private $fileDiff;
|
||||
/**
|
||||
* @var CollectedData[]
|
||||
* @readonly
|
||||
*/
|
||||
private $collectedDatas;
|
||||
/**
|
||||
* @param SystemError[] $systemErrors
|
||||
* @param CollectedData[] $collectedDatas
|
||||
*/
|
||||
public function __construct(array $systemErrors, ?FileDiff $fileDiff, array $collectedDatas)
|
||||
public function __construct(array $systemErrors, ?FileDiff $fileDiff)
|
||||
{
|
||||
$this->systemErrors = $systemErrors;
|
||||
$this->fileDiff = $fileDiff;
|
||||
$this->collectedDatas = $collectedDatas;
|
||||
Assert::allIsInstanceOf($systemErrors, SystemError::class);
|
||||
Assert::allIsInstanceOf($collectedDatas, CollectedData::class);
|
||||
}
|
||||
/**
|
||||
* @return SystemError[]
|
||||
@ -47,11 +38,4 @@ final class FileProcessResult
|
||||
{
|
||||
return $this->fileDiff;
|
||||
}
|
||||
/**
|
||||
* @return CollectedData[]
|
||||
*/
|
||||
public function getCollectedData() : array
|
||||
{
|
||||
return $this->collectedDatas;
|
||||
}
|
||||
}
|
||||
|
@ -7,20 +7,16 @@ namespace RectorPrefix202401;
|
||||
\class_alias('Rector\\Application\\ApplicationFileProcessor', 'Rector\\Core\\Application\\ApplicationFileProcessor');
|
||||
\class_alias('Rector\\Application\\ChangedNodeScopeRefresher', 'Rector\\Core\\Application\\ChangedNodeScopeRefresher');
|
||||
\class_alias('Rector\\Application\\Collector\\CollectorNodeVisitor', 'Rector\\Core\\Application\\Collector\\CollectorNodeVisitor');
|
||||
\class_alias('Rector\\Application\\Collector\\CollectorProcessor', 'Rector\\Core\\Application\\Collector\\CollectorProcessor');
|
||||
\class_alias('Rector\\Application\\FileProcessor', 'Rector\\Core\\Application\\FileProcessor');
|
||||
\class_alias('Rector\\Application\\VersionResolver', 'Rector\\Core\\Application\\VersionResolver');
|
||||
\class_alias('Rector\\Autoloading\\AdditionalAutoloader', 'Rector\\Core\\Autoloading\\AdditionalAutoloader');
|
||||
\class_alias('Rector\\Autoloading\\BootstrapFilesIncluder', 'Rector\\Core\\Autoloading\\BootstrapFilesIncluder');
|
||||
\class_alias('Rector\\Bootstrap\\ExtensionConfigResolver', 'Rector\\Core\\Bootstrap\\ExtensionConfigResolver');
|
||||
\class_alias('Rector\\Bootstrap\\RectorConfigsResolver', 'Rector\\Core\\Bootstrap\\RectorConfigsResolver');
|
||||
\class_alias('Rector\\Collector\\MockedClassCollector', 'Rector\\Core\\Collector\\MockedClassCollector');
|
||||
\class_alias('Rector\\Collector\\ParentClassCollector', 'Rector\\Core\\Collector\\ParentClassCollector');
|
||||
\class_alias('Rector\\Configuration\\ConfigInitializer', 'Rector\\Core\\Configuration\\ConfigInitializer');
|
||||
\class_alias('Rector\\Configuration\\ConfigurationFactory', 'Rector\\Core\\Configuration\\ConfigurationFactory');
|
||||
\class_alias('Rector\\Configuration\\Option', 'Rector\\Core\\Configuration\\Option');
|
||||
\class_alias('Rector\\Configuration\\Parameter\\SimpleParameterProvider', 'Rector\\Core\\Configuration\\Parameter\\SimpleParameterProvider');
|
||||
\class_alias('Rector\\Configuration\\RenamedClassesDataCollector', 'Rector\\Core\\Configuration\\RenamedClassesDataCollector');
|
||||
\class_alias('Rector\\Console\\Command\\ListRulesCommand', 'Rector\\Core\\Console\\Command\\ListRulesCommand');
|
||||
\class_alias('Rector\\Console\\Command\\ProcessCommand', 'Rector\\Core\\Console\\Command\\ProcessCommand');
|
||||
\class_alias('Rector\\Console\\Command\\SetupCICommand', 'Rector\\Core\\Console\\Command\\SetupCICommand');
|
||||
@ -118,7 +114,6 @@ namespace RectorPrefix202401;
|
||||
\class_alias('Rector\\PhpParser\\ValueObject\\StmtsAndTokens', 'Rector\\Core\\PhpParser\\ValueObject\\StmtsAndTokens');
|
||||
\class_alias('Rector\\ProcessAnalyzer\\RectifiedAnalyzer', 'Rector\\Core\\ProcessAnalyzer\\RectifiedAnalyzer');
|
||||
\class_alias('Rector\\Provider\\CurrentFileProvider', 'Rector\\Core\\Provider\\CurrentFileProvider');
|
||||
\class_alias('Rector\\Rector\\AbstractCollectorRector', 'Rector\\Core\\Rector\\AbstractCollectorRector');
|
||||
\class_alias('Rector\\Rector\\AbstractRector', 'Rector\\Core\\Rector\\AbstractRector');
|
||||
\class_alias('Rector\\Rector\\AbstractScopeAwareRector', 'Rector\\Core\\Rector\\AbstractScopeAwareRector');
|
||||
\class_alias('Rector\\Reflection\\ClassModifierChecker', 'Rector\\Core\\Reflection\\ClassModifierChecker');
|
||||
|
6
vendor/composer/autoload_classmap.php
vendored
6
vendor/composer/autoload_classmap.php
vendored
@ -945,8 +945,6 @@ return array(
|
||||
'RectorPrefix202401\\Webmozart\\Assert\\Mixin' => $vendorDir . '/webmozart/assert/src/Mixin.php',
|
||||
'Rector\\Application\\ApplicationFileProcessor' => $baseDir . '/src/Application/ApplicationFileProcessor.php',
|
||||
'Rector\\Application\\ChangedNodeScopeRefresher' => $baseDir . '/src/Application/ChangedNodeScopeRefresher.php',
|
||||
'Rector\\Application\\Collector\\CollectorNodeVisitor' => $baseDir . '/src/Application/Collector/CollectorNodeVisitor.php',
|
||||
'Rector\\Application\\Collector\\CollectorProcessor' => $baseDir . '/src/Application/Collector/CollectorProcessor.php',
|
||||
'Rector\\Application\\FileProcessor' => $baseDir . '/src/Application/FileProcessor.php',
|
||||
'Rector\\Application\\VersionResolver' => $baseDir . '/src/Application/VersionResolver.php',
|
||||
'Rector\\Arguments\\ArgumentDefaultValueReplacer' => $baseDir . '/rules/Arguments/ArgumentDefaultValueReplacer.php',
|
||||
@ -1168,8 +1166,6 @@ return array(
|
||||
'Rector\\CodingStyle\\Rector\\Use_\\SeparateMultiUseImportsRector' => $baseDir . '/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php',
|
||||
'Rector\\CodingStyle\\Reflection\\VendorLocationDetector' => $baseDir . '/rules/CodingStyle/Reflection/VendorLocationDetector.php',
|
||||
'Rector\\CodingStyle\\ValueObject\\ObjectMagicMethods' => $baseDir . '/rules/CodingStyle/ValueObject/ObjectMagicMethods.php',
|
||||
'Rector\\Collector\\MockedClassCollector' => $baseDir . '/src/Collector/MockedClassCollector.php',
|
||||
'Rector\\Collector\\ParentClassCollector' => $baseDir . '/src/Collector/ParentClassCollector.php',
|
||||
'Rector\\Comments\\CommentRemover' => $baseDir . '/src/Comments/CommentRemover.php',
|
||||
'Rector\\Comments\\NodeDocBlock\\DocBlockUpdater' => $baseDir . '/src/Comments/NodeDocBlock/DocBlockUpdater.php',
|
||||
'Rector\\Comments\\NodeTraverser\\CommentRemovingNodeTraverser' => $baseDir . '/src/Comments/NodeTraverser/CommentRemovingNodeTraverser.php',
|
||||
@ -1959,7 +1955,6 @@ return array(
|
||||
'Rector\\Privatization\\Guard\\ParentPropertyLookupGuard' => $baseDir . '/rules/Privatization/Guard/ParentPropertyLookupGuard.php',
|
||||
'Rector\\Privatization\\NodeManipulator\\VisibilityManipulator' => $baseDir . '/rules/Privatization/NodeManipulator/VisibilityManipulator.php',
|
||||
'Rector\\Privatization\\Rector\\ClassMethod\\PrivatizeFinalClassMethodRector' => $baseDir . '/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php',
|
||||
'Rector\\Privatization\\Rector\\Class_\\FinalizeClassesWithoutChildrenCollectorRector' => $baseDir . '/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenCollectorRector.php',
|
||||
'Rector\\Privatization\\Rector\\Class_\\FinalizeClassesWithoutChildrenRector' => $baseDir . '/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php',
|
||||
'Rector\\Privatization\\Rector\\MethodCall\\PrivatizeLocalGetterToPropertyRector' => $baseDir . '/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php',
|
||||
'Rector\\Privatization\\Rector\\Property\\PrivatizeFinalClassPropertyRector' => $baseDir . '/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php',
|
||||
@ -1972,7 +1967,6 @@ return array(
|
||||
'Rector\\RectorInstaller\\LocalFilesystem' => $vendorDir . '/rector/extension-installer/src/LocalFilesystem.php',
|
||||
'Rector\\RectorInstaller\\Plugin' => $vendorDir . '/rector/extension-installer/src/Plugin.php',
|
||||
'Rector\\RectorInstaller\\PluginInstaller' => $vendorDir . '/rector/extension-installer/src/PluginInstaller.php',
|
||||
'Rector\\Rector\\AbstractCollectorRector' => $baseDir . '/src/Rector/AbstractCollectorRector.php',
|
||||
'Rector\\Rector\\AbstractRector' => $baseDir . '/src/Rector/AbstractRector.php',
|
||||
'Rector\\Rector\\AbstractScopeAwareRector' => $baseDir . '/src/Rector/AbstractScopeAwareRector.php',
|
||||
'Rector\\Reflection\\ClassModifierChecker' => $baseDir . '/src/Reflection/ClassModifierChecker.php',
|
||||
|
6
vendor/composer/autoload_static.php
vendored
6
vendor/composer/autoload_static.php
vendored
@ -1159,8 +1159,6 @@ class ComposerStaticInit0d7ac37abdc3277d2804c7296dfa0f13
|
||||
'RectorPrefix202401\\Webmozart\\Assert\\Mixin' => __DIR__ . '/..' . '/webmozart/assert/src/Mixin.php',
|
||||
'Rector\\Application\\ApplicationFileProcessor' => __DIR__ . '/../..' . '/src/Application/ApplicationFileProcessor.php',
|
||||
'Rector\\Application\\ChangedNodeScopeRefresher' => __DIR__ . '/../..' . '/src/Application/ChangedNodeScopeRefresher.php',
|
||||
'Rector\\Application\\Collector\\CollectorNodeVisitor' => __DIR__ . '/../..' . '/src/Application/Collector/CollectorNodeVisitor.php',
|
||||
'Rector\\Application\\Collector\\CollectorProcessor' => __DIR__ . '/../..' . '/src/Application/Collector/CollectorProcessor.php',
|
||||
'Rector\\Application\\FileProcessor' => __DIR__ . '/../..' . '/src/Application/FileProcessor.php',
|
||||
'Rector\\Application\\VersionResolver' => __DIR__ . '/../..' . '/src/Application/VersionResolver.php',
|
||||
'Rector\\Arguments\\ArgumentDefaultValueReplacer' => __DIR__ . '/../..' . '/rules/Arguments/ArgumentDefaultValueReplacer.php',
|
||||
@ -1382,8 +1380,6 @@ class ComposerStaticInit0d7ac37abdc3277d2804c7296dfa0f13
|
||||
'Rector\\CodingStyle\\Rector\\Use_\\SeparateMultiUseImportsRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php',
|
||||
'Rector\\CodingStyle\\Reflection\\VendorLocationDetector' => __DIR__ . '/../..' . '/rules/CodingStyle/Reflection/VendorLocationDetector.php',
|
||||
'Rector\\CodingStyle\\ValueObject\\ObjectMagicMethods' => __DIR__ . '/../..' . '/rules/CodingStyle/ValueObject/ObjectMagicMethods.php',
|
||||
'Rector\\Collector\\MockedClassCollector' => __DIR__ . '/../..' . '/src/Collector/MockedClassCollector.php',
|
||||
'Rector\\Collector\\ParentClassCollector' => __DIR__ . '/../..' . '/src/Collector/ParentClassCollector.php',
|
||||
'Rector\\Comments\\CommentRemover' => __DIR__ . '/../..' . '/src/Comments/CommentRemover.php',
|
||||
'Rector\\Comments\\NodeDocBlock\\DocBlockUpdater' => __DIR__ . '/../..' . '/src/Comments/NodeDocBlock/DocBlockUpdater.php',
|
||||
'Rector\\Comments\\NodeTraverser\\CommentRemovingNodeTraverser' => __DIR__ . '/../..' . '/src/Comments/NodeTraverser/CommentRemovingNodeTraverser.php',
|
||||
@ -2173,7 +2169,6 @@ class ComposerStaticInit0d7ac37abdc3277d2804c7296dfa0f13
|
||||
'Rector\\Privatization\\Guard\\ParentPropertyLookupGuard' => __DIR__ . '/../..' . '/rules/Privatization/Guard/ParentPropertyLookupGuard.php',
|
||||
'Rector\\Privatization\\NodeManipulator\\VisibilityManipulator' => __DIR__ . '/../..' . '/rules/Privatization/NodeManipulator/VisibilityManipulator.php',
|
||||
'Rector\\Privatization\\Rector\\ClassMethod\\PrivatizeFinalClassMethodRector' => __DIR__ . '/../..' . '/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php',
|
||||
'Rector\\Privatization\\Rector\\Class_\\FinalizeClassesWithoutChildrenCollectorRector' => __DIR__ . '/../..' . '/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenCollectorRector.php',
|
||||
'Rector\\Privatization\\Rector\\Class_\\FinalizeClassesWithoutChildrenRector' => __DIR__ . '/../..' . '/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php',
|
||||
'Rector\\Privatization\\Rector\\MethodCall\\PrivatizeLocalGetterToPropertyRector' => __DIR__ . '/../..' . '/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php',
|
||||
'Rector\\Privatization\\Rector\\Property\\PrivatizeFinalClassPropertyRector' => __DIR__ . '/../..' . '/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php',
|
||||
@ -2186,7 +2181,6 @@ class ComposerStaticInit0d7ac37abdc3277d2804c7296dfa0f13
|
||||
'Rector\\RectorInstaller\\LocalFilesystem' => __DIR__ . '/..' . '/rector/extension-installer/src/LocalFilesystem.php',
|
||||
'Rector\\RectorInstaller\\Plugin' => __DIR__ . '/..' . '/rector/extension-installer/src/Plugin.php',
|
||||
'Rector\\RectorInstaller\\PluginInstaller' => __DIR__ . '/..' . '/rector/extension-installer/src/PluginInstaller.php',
|
||||
'Rector\\Rector\\AbstractCollectorRector' => __DIR__ . '/../..' . '/src/Rector/AbstractCollectorRector.php',
|
||||
'Rector\\Rector\\AbstractRector' => __DIR__ . '/../..' . '/src/Rector/AbstractRector.php',
|
||||
'Rector\\Rector\\AbstractScopeAwareRector' => __DIR__ . '/../..' . '/src/Rector/AbstractScopeAwareRector.php',
|
||||
'Rector\\Reflection\\ClassModifierChecker' => __DIR__ . '/../..' . '/src/Reflection/ClassModifierChecker.php',
|
||||
|
Loading…
x
Reference in New Issue
Block a user