Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 31, 2022
1 parent d70ed25 commit 6aa1c92
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/Kernel/RectorKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,13 @@ public function getContainer(): ContainerInterface
*/
private function createCompilerPasses(): array
{
$compilerPasses = [];

// must run before AutowireArrayParameterCompilerPass, as the autowired array cannot contain removed services
$compilerPasses[] = new RemoveSkippedRectorsCompilerPass();

// autowire Rectors by default (mainly for tests)
$compilerPasses[] = new AutowireInterfacesCompilerPass([RectorInterface::class]);
$compilerPasses[] = new MakeRectorsPublicCompilerPass();

// add all merged arguments of Rector services
$compilerPasses[] = new MergeImportedRectorConfigureCallValuesCompilerPass($this->configureCallValuesCollector);
$compilerPasses[] = new AutowireArrayParameterCompilerPass();

return $compilerPasses;
return [
new RemoveSkippedRectorsCompilerPass(),
new AutowireInterfacesCompilerPass([RectorInterface::class]),
new MakeRectorsPublicCompilerPass(),
new MergeImportedRectorConfigureCallValuesCompilerPass($this->configureCallValuesCollector),
new AutowireArrayParameterCompilerPass(),
];
}

/**
Expand Down

0 comments on commit 6aa1c92

Please sign in to comment.