Skip to content

Commit

Permalink
Merge pull request #1637 from rectorphp/bootstrap-config
Browse files Browse the repository at this point in the history
[Parallel] Using RectorConfigsResolver to use set bootstrap config
  • Loading branch information
samsonasik committed Jan 4, 2022
2 parents a66be59 + 7e575a7 commit 0f67baa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions packages/Parallel/Command/WorkerCommandLineFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ public function create(
// @see https://github.com/symfony/symfony/issues/1238
$workerCommandArray[] = '--no-ansi';

if ($input->hasOption(Option::CONFIG)) {
$workerCommandArray[] = '--config';
$workerCommandArray[] = $input->getOption(Option::CONFIG);
}

return implode(' ', $workerCommandArray);
}

Expand Down
4 changes: 3 additions & 1 deletion src/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Rector\Core\Configuration;

use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
use Rector\Core\Bootstrap\RectorConfigsResolver;
use Rector\Core\ValueObject\Configuration;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
Expand Down Expand Up @@ -48,6 +49,7 @@ public function createFromInput(InputInterface $input): Configuration
$isParallel = $this->parameterProvider->provideBoolParameter(Option::PARALLEL);
$parallelPort = (string) $input->getOption(Option::PARALLEL_PORT);
$parallelIdentifier = (string) $input->getOption(Option::PARALLEL_IDENTIFIER);
$rectorConfigsResolver = new RectorConfigsResolver();

return new Configuration(
$isDryRun,
Expand All @@ -57,7 +59,7 @@ public function createFromInput(InputInterface $input): Configuration
$fileExtensions,
$paths,
$showDiffs,
null,
$rectorConfigsResolver->provide(),
$parallelPort,
$parallelIdentifier,
$isParallel
Expand Down

0 comments on commit 0f67baa

Please sign in to comment.