Skip to content

Commit

Permalink
[TASK] Use rector-installer to load config of extensions
Browse files Browse the repository at this point in the history
- Relates: #6129
  • Loading branch information
sabbelasichon committed Apr 20, 2021
1 parent d723aca commit 0b7c6a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 36 deletions.
19 changes: 11 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"bin": [
"bin/rector"
],
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"homepage": "https://getrector.org",
"keywords": [
Expand Down Expand Up @@ -37,15 +39,16 @@
"nette/robot-loader": "^3.4",
"nette/utils": "^3.2",
"nikic/php-parser": "^4.10.4",
"phpstan/phpstan": "^0.12.83",
"phpstan/phpdoc-parser": "^0.5.4",
"phpstan/phpstan": "^0.12.83",
"phpstan/phpstan-phpunit": "^0.12.18",
"rector/rector-symfony": "^0.10.3",
"rector/rector-nette": "^0.10.5",
"rector/rector-laravel": "^0.10.1",
"rector/rector-cakephp": "^0.10.3",
"rector/rector-phpunit": "^0.10.6",
"rector/rector-doctrine": "^0.10.2",
"rector/rector-cakephp": "dev-main",
"rector/rector-doctrine": "dev-main",
"rector/rector-installer": "dev-main",
"rector/rector-laravel": "dev-main",
"rector/rector-nette": "dev-main",
"rector/rector-phpunit": "dev-main",
"rector/rector-symfony": "dev-main",
"sebastian/diff": "^4.0.4",
"symfony/console": "^4.4.8|^5.1",
"symfony/dependency-injection": "^5.1",
Expand Down Expand Up @@ -73,7 +76,7 @@
"nette/forms": "^3.0",
"phpstan/phpstan-nette": "^0.12.16",
"phpunit/phpunit": "^9.5",
"rector/rector-generator": "^0.1.5",
"rector/rector-generator": "dev-main",
"symplify/coding-standard": "^9.2.16",
"symplify/easy-ci": "^9.2.16",
"symplify/easy-coding-standard": "^9.2.16",
Expand Down
28 changes: 0 additions & 28 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,6 @@
$containerConfigurator->import(__DIR__ . '/services-packages.php');
$containerConfigurator->import(__DIR__ . '/parameters.php');

// rector root
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-symfony/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-nette/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-laravel/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-phpunit/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-cakephp/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../vendor/rector/rector-doctrine/config/config.php', null, 'not_found');

// rector sub-package
$containerConfigurator->import(__DIR__ . '/../../rector-symfony/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-nette/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-laravel/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-phpunit/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-cakephp/config/config.php', null, 'not_found');
$containerConfigurator->import(__DIR__ . '/../../rector-doctrine/config/config.php', null, 'not_found');

// only for dev
// only for dev
if (class_exists(RectorGeneratorBundle::class)) {
$containerConfigurator->import(
__DIR__ . '/../vendor/rector/rector-generator/config/config.php',
null,
'not_found'
);
// 3rd party dependency
$containerConfigurator->import(__DIR__ . '/../../rector-generator/config/config.php', null, 'not_found');
}

// require only in dev
$containerConfigurator->import(__DIR__ . '/../utils/compiler/config/config.php', null, 'not_found');

Expand Down

0 comments on commit 0b7c6a3

Please sign in to comment.