diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 33fb2b6b88c..2a558011796 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,7 +31,6 @@ jobs: - 'e2e/parallel-reflection-resolver' - 'e2e/applied-rule-removed-node' - 'e2e/parallel with space' - - 'e2e/wildcards-path-import-config' - 'e2e/different-path-over-skip-config' name: End to end test - ${{ matrix.directory }} diff --git a/build/config/config-downgrade.php b/build/config/config-downgrade.php index 8bb9bfbe0eb..ca923cd4e3c 100644 --- a/build/config/config-downgrade.php +++ b/build/config/config-downgrade.php @@ -8,13 +8,11 @@ require_once __DIR__ . '/../target-repository/stubs-rector/PHPUnit/Framework/TestCase.php'; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->parallel(); - $rectorConfig->skip(DowngradeRectorConfig::DEPENDENCY_EXCLUDE_PATHS); $rectorConfig->phpstanConfig(__DIR__ . '/phpstan-for-downgrade.neon'); - $rectorConfig->import(DowngradeLevelSetList::DOWN_TO_PHP_72); + $rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_72]); }; /** diff --git a/build/target-repository/e2e/attributes/rector.php b/build/target-repository/e2e/attributes/rector.php index fe7a82b24be..719283e5720 100644 --- a/build/target-repository/e2e/attributes/rector.php +++ b/build/target-repository/e2e/attributes/rector.php @@ -7,7 +7,7 @@ use Rector\Symfony\Set\SymfonySetList; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->import(SymfonySetList::SYMFONY_52); + $rectorConfig->sets([SymfonySetList::SYMFONY_52]); $rectorConfig->phpVersion(PhpVersion::PHP_80); $rectorConfig->paths([__DIR__ . '/src']); diff --git a/build/target-repository/e2e/dont-execute-code/rector.php b/build/target-repository/e2e/dont-execute-code/rector.php index 1ce2e5b5e1c..11af563f5c7 100644 --- a/build/target-repository/e2e/dont-execute-code/rector.php +++ b/build/target-repository/e2e/dont-execute-code/rector.php @@ -8,5 +8,5 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([__DIR__.'/src']); - $rectorConfig->import(SetList::PHP_53); + $rectorConfig->sets([SetList::PHP_53]); }; diff --git a/build/target-repository/e2e/parse-match-class-on-php74/rector.php b/build/target-repository/e2e/parse-match-class-on-php74/rector.php index 8349d3544d2..c51be29f58c 100644 --- a/build/target-repository/e2e/parse-match-class-on-php74/rector.php +++ b/build/target-repository/e2e/parse-match-class-on-php74/rector.php @@ -8,5 +8,5 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([__DIR__.'/src']); - $rectorConfig->import(SetList::DEAD_CODE); + $rectorConfig->sets([SetList::DEAD_CODE]); }; diff --git a/build/target-repository/e2e/parse-php7-code/rector.php b/build/target-repository/e2e/parse-php7-code/rector.php index 1ce2e5b5e1c..11af563f5c7 100644 --- a/build/target-repository/e2e/parse-php7-code/rector.php +++ b/build/target-repository/e2e/parse-php7-code/rector.php @@ -8,5 +8,5 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([__DIR__.'/src']); - $rectorConfig->import(SetList::PHP_53); + $rectorConfig->sets([SetList::PHP_53]); }; diff --git a/build/target-repository/e2e/parse-php8-code/rector.php b/build/target-repository/e2e/parse-php8-code/rector.php index 1ce2e5b5e1c..11af563f5c7 100644 --- a/build/target-repository/e2e/parse-php8-code/rector.php +++ b/build/target-repository/e2e/parse-php8-code/rector.php @@ -8,5 +8,5 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([__DIR__.'/src']); - $rectorConfig->import(SetList::PHP_53); + $rectorConfig->sets([SetList::PHP_53]); }; diff --git a/e2e/wildcards-path-import-config/.gitignore b/e2e/wildcards-path-import-config/.gitignore deleted file mode 100644 index 61ead86667c..00000000000 --- a/e2e/wildcards-path-import-config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/vendor diff --git a/e2e/wildcards-path-import-config/composer.json b/e2e/wildcards-path-import-config/composer.json deleted file mode 100644 index 5468cd74606..00000000000 --- a/e2e/wildcards-path-import-config/composer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "require": { - "php": "^8.1" - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/e2e/wildcards-path-import-config/config/import_config.php b/e2e/wildcards-path-import-config/config/import_config.php deleted file mode 100644 index c87491f0931..00000000000 --- a/e2e/wildcards-path-import-config/config/import_config.php +++ /dev/null @@ -1,10 +0,0 @@ -rule(RemoveEmptyClassMethodRector::class); -}; diff --git a/e2e/wildcards-path-import-config/config/import_config_another.php b/e2e/wildcards-path-import-config/config/import_config_another.php deleted file mode 100644 index 284db15c501..00000000000 --- a/e2e/wildcards-path-import-config/config/import_config_another.php +++ /dev/null @@ -1,10 +0,0 @@ -rule(RemoveUnreachableStatementRector::class); -}; diff --git a/e2e/wildcards-path-import-config/expected-output.diff b/e2e/wildcards-path-import-config/expected-output.diff deleted file mode 100644 index 4b2d9148f4d..00000000000 --- a/e2e/wildcards-path-import-config/expected-output.diff +++ /dev/null @@ -1,38 +0,0 @@ -2 files with changes -==================== - -1) src/DeadConstructor.php:1 - - ---------- begin diff ---------- -@@ @@ - - final class DeadConstructor - { -- public function __construct() -- { -- } - } - ----------- end diff ----------- - -Applied rules: - * RemoveEmptyClassMethodRector - - -2) src/GotUnreachableReturn.php:4 - - ---------- begin diff ---------- -@@ @@ - public function run() - { - throw new Exception(); -- -- return 'test'; - } - } - ----------- end diff ----------- - -Applied rules: - * RemoveUnreachableStatementRector - - - [OK] 2 files would have changed (dry-run) by Rector diff --git a/e2e/wildcards-path-import-config/rector.php b/e2e/wildcards-path-import-config/rector.php deleted file mode 100644 index 0e35cfccaf0..00000000000 --- a/e2e/wildcards-path-import-config/rector.php +++ /dev/null @@ -1,13 +0,0 @@ -paths([ - __DIR__ . '/src', - ]); - - $rectorConfig->import(__DIR__ . '/config/*'); -}; diff --git a/e2e/wildcards-path-import-config/src/DeadConstructor.php b/e2e/wildcards-path-import-config/src/DeadConstructor.php deleted file mode 100644 index 03d800c4879..00000000000 --- a/e2e/wildcards-path-import-config/src/DeadConstructor.php +++ /dev/null @@ -1,8 +0,0 @@ -resolveWithFnmatch($paths); - } - - foreach ($paths as $path) { - $this->importFile($path); - } + $this->importFile($filePath); } /**