Skip to content

Commit

Permalink
use bundles if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Mar 19, 2021
1 parent 056ec7e commit 4bc2316
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@
$containerConfigurator->import(__DIR__ . '/../../rector-laravel/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-phpunit/config/config.php', null, 'not_found');

// rector root
$containerConfigurator->import(__DIR__ . '/../vendor/symplify/console-color-diff/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/symplify/composer-json-manipulator/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/symplify/skipper/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/symplify/simple-php-doc-parser/config/config.php', null, 'not_found');

// rector sub-package
$containerConfigurator->import(__DIR__ . '/../../../symplify/console-color-diff/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../../symplify/composer-json-manipulator/config/config.php');
$containerConfigurator->import(__DIR__ . '/../../../symplify/skipper/config/config.php');
$containerConfigurator->import(__DIR__ . '/../../../symplify/simple-php-doc-parser/config/config.php');

// only for dev
if (class_exists(RectorGeneratorBundle::class)) {
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-generator/config/config.php');
Expand Down
13 changes: 12 additions & 1 deletion src/HttpKernel/RectorKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\Kernel;
use Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass;
use Symplify\ComposerJsonManipulator\Bundle\ComposerJsonManipulatorBundle;
use Symplify\ConsoleColorDiff\Bundle\ConsoleColorDiffBundle;
use Symplify\PackageBuilder\Contract\HttpKernel\ExtraConfigAwareKernelInterface;
use Symplify\PackageBuilder\DependencyInjection\CompilerPass\AutowireInterfacesCompilerPass;
use Symplify\SimplePhpDocParser\Bundle\SimplePhpDocParserBundle;
use Symplify\Skipper\Bundle\SkipperBundle;

/**
* @todo possibly remove symfony/http-kernel and use the container build only
Expand Down Expand Up @@ -82,7 +86,14 @@ public function setConfigs(array $configs): void
*/
public function registerBundles(): iterable
{
return [];
$bundles = [
new ConsoleColorDiffBundle(),
new ComposerJsonManipulatorBundle(),
new SkipperBundle(),
new SimplePhpDocParserBundle()
];

return $bundles;
}

protected function build(ContainerBuilder $containerBuilder): void
Expand Down

0 comments on commit 4bc2316

Please sign in to comment.