mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-16 08:02:23 +00:00
Move Bootstrap file includer to load in RectorContainerFactory (#2382)
* Move Bootstrap file includer to load in RectorContainerFactory * [ci-review] Rector Rectify * keep in test * back to ^1.7.1 Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
429e5746ea
commit
38cb4c9684
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^7.2|^8.0",
|
||||
"phpstan/phpstan": "1.7.1"
|
||||
"phpstan/phpstan": "^1.7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"nikic/php-parser": "^4.13.2",
|
||||
"ondram/ci-detector": "^4.1",
|
||||
"phpstan/phpdoc-parser": "^1.5.1",
|
||||
"phpstan/phpstan": "1.7.1",
|
||||
"phpstan/phpstan": "^1.7.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"react/child-process": "^0.6.4",
|
||||
"react/event-loop": "^1.3",
|
||||
|
|
|
@ -8,7 +8,6 @@ use Rector\Caching\Detector\ChangedFilesDetector;
|
|||
use Rector\ChangesReporting\Output\JsonOutputFormatter;
|
||||
use Rector\Core\Application\ApplicationFileProcessor;
|
||||
use Rector\Core\Autoloading\AdditionalAutoloader;
|
||||
use Rector\Core\Autoloading\BootstrapFilesIncluder;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Console\Output\OutputFormatterCollector;
|
||||
use Rector\Core\Contract\Console\OutputStyleInterface;
|
||||
|
@ -33,7 +32,6 @@ final class ProcessCommand extends AbstractProcessCommand
|
|||
private readonly ChangedFilesDetector $changedFilesDetector,
|
||||
private readonly MissingRectorRulesReporter $missingRectorRulesReporter,
|
||||
private readonly ApplicationFileProcessor $applicationFileProcessor,
|
||||
private readonly BootstrapFilesIncluder $bootstrapFilesIncluder,
|
||||
private readonly ProcessResultFactory $processResultFactory,
|
||||
private readonly DynamicSourceLocatorDecorator $dynamicSourceLocatorDecorator,
|
||||
private readonly EmptyConfigurableRectorChecker $emptyConfigurableRectorChecker,
|
||||
|
@ -67,9 +65,6 @@ final class ProcessCommand extends AbstractProcessCommand
|
|||
$this->rectorOutputStyle->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
||||
}
|
||||
|
||||
// register autoloaded and included files
|
||||
$this->bootstrapFilesIncluder->includeBootstrapFiles();
|
||||
|
||||
$this->additionalAutoloader->autoloadInput($input);
|
||||
$this->additionalAutoloader->autoloadPaths();
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Rector\Core\DependencyInjection;
|
|||
use Nette\Utils\FileSystem;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Rector\Caching\Detector\ChangedFilesDetector;
|
||||
use Rector\Core\Autoloading\BootstrapFilesIncluder;
|
||||
use Rector\Core\Kernel\RectorKernel;
|
||||
use Rector\Core\ValueObject\Bootstrap\BootstrapConfigs;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
@ -42,6 +43,10 @@ final class RectorContainerFactory
|
|||
$changedFilesDetector->setFirstResolvedConfigFileInfo($mainConfigFile);
|
||||
}
|
||||
|
||||
/** @var BootstrapFilesIncluder $bootstrapFilesIncluder */
|
||||
$bootstrapFilesIncluder = $container->get(BootstrapFilesIncluder::class);
|
||||
$bootstrapFilesIncluder->includeBootstrapFiles();
|
||||
|
||||
return $container;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user