diff --git a/.vortex/cli/tests/Fixtures/handler_process/_baseline/rector.php b/.vortex/cli/tests/Fixtures/handler_process/_baseline/rector.php index 7e88bdf8d..6aa3af9b5 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/_baseline/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/_baseline/rector.php @@ -17,8 +17,6 @@ declare(strict_types=1); use DrupalFinder\DrupalFinderComposerRuntime; -use DrupalRector\Set\Drupal10SetList; -use DrupalRector\Set\Drupal9SetList; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector; use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; @@ -99,11 +97,10 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Drupal-specific deprecation fixes. - ->withSets([ - Drupal9SetList::DRUPAL_9, - Drupal10SetList::DRUPAL_10, - ]) + // Drupal-specific deprecation fixes. Each rule is bound to a `drupal/core` + // version and runs only when the installed core matches, so the set tracks + // core upgrades without changing this configuration. + ->withComposerBased(drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/cli/tests/Fixtures/handler_process/hosting_acquia/rector.php b/.vortex/cli/tests/Fixtures/handler_process/hosting_acquia/rector.php index 2a9db26d1..1fbd9e190 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/hosting_acquia/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/hosting_acquia/rector.php @@ -1,4 +1,4 @@ -@@ -48,10 +48,10 @@ +@@ -46,10 +46,10 @@ return RectorConfig::configure() ->withPaths([ @@ -13,7 +13,7 @@ __DIR__ . '/tests', ]) ->withSkip([ -@@ -79,7 +79,7 @@ +@@ -77,7 +77,7 @@ RenameVariableToMatchNewTypeRector::class, SimplifyEmptyCheckOnEmptyArrayRector::class, StringClassNameToClassConstantRector::class => [ diff --git a/.vortex/cli/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php b/.vortex/cli/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php index 2a9db26d1..1fbd9e190 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php @@ -1,4 +1,4 @@ -@@ -48,10 +48,10 @@ +@@ -46,10 +46,10 @@ return RectorConfig::configure() ->withPaths([ @@ -13,7 +13,7 @@ __DIR__ . '/tests', ]) ->withSkip([ -@@ -79,7 +79,7 @@ +@@ -77,7 +77,7 @@ RenameVariableToMatchNewTypeRector::class, SimplifyEmptyCheckOnEmptyArrayRector::class, StringClassNameToClassConstantRector::class => [ diff --git a/.vortex/cli/tests/Fixtures/handler_process/theme_claro/rector.php b/.vortex/cli/tests/Fixtures/handler_process/theme_claro/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/theme_claro/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/theme_claro/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/theme_olivero/rector.php b/.vortex/cli/tests/Fixtures/handler_process/theme_olivero/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/theme_olivero/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/theme_olivero/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/theme_stark/rector.php b/.vortex/cli/tests/Fixtures/handler_process/theme_stark/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/theme_stark/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/theme_stark/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php index 5360fd94f..b1f8979ed 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php @@ -1,4 +1,4 @@ -@@ -38,7 +38,6 @@ +@@ -36,7 +36,6 @@ use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; @@ -6,7 +6,7 @@ use Rector\Privatization\Rector\ClassConst\PrivatizeFinalClassConstantRector; use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; -@@ -88,8 +87,6 @@ +@@ -86,8 +85,6 @@ // PHP version upgrade sets - modernizes syntax to PHP 8.4. // Includes all rules from PHP 5.3 through 8.4. ->withPhpSets(php84: TRUE) @@ -15,7 +15,7 @@ // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -107,7 +104,6 @@ +@@ -104,7 +101,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php index 5360fd94f..b1f8979ed 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -38,7 +38,6 @@ +@@ -36,7 +36,6 @@ use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; @@ -6,7 +6,7 @@ use Rector\Privatization\Rector\ClassConst\PrivatizeFinalClassConstantRector; use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; -@@ -88,8 +87,6 @@ +@@ -86,8 +85,6 @@ // PHP version upgrade sets - modernizes syntax to PHP 8.4. // Includes all rules from PHP 5.3 through 8.4. ->withPhpSets(php84: TRUE) @@ -15,7 +15,7 @@ // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -107,7 +104,6 @@ +@@ -104,7 +101,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat/rector.php index 66118572f..b23b5aab3 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat/rector.php @@ -1,4 +1,4 @@ -@@ -88,8 +88,6 @@ +@@ -86,8 +86,6 @@ // PHP version upgrade sets - modernizes syntax to PHP 8.4. // Includes all rules from PHP 5.3 through 8.4. ->withPhpSets(php84: TRUE) diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php index 66118572f..b23b5aab3 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -88,8 +88,6 @@ +@@ -86,8 +86,6 @@ // PHP version upgrade sets - modernizes syntax to PHP 8.4. // Includes all rules from PHP 5.3 through 8.4. ->withPhpSets(php84: TRUE) diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit/rector.php index 38a934ba6..de039464a 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit/rector.php @@ -1,4 +1,4 @@ -@@ -38,7 +38,6 @@ +@@ -36,7 +36,6 @@ use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; @@ -6,7 +6,7 @@ use Rector\Privatization\Rector\ClassConst\PrivatizeFinalClassConstantRector; use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; -@@ -107,7 +106,6 @@ +@@ -104,7 +103,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php index 38a934ba6..de039464a 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -38,7 +38,6 @@ +@@ -36,7 +36,6 @@ use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; @@ -6,7 +6,7 @@ use Rector\Privatization\Rector\ClassConst\PrivatizeFinalClassConstantRector; use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; -@@ -107,7 +106,6 @@ +@@ -104,7 +103,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/cli/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php b/.vortex/cli/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php index a9ba3936d..be61deb99 100644 --- a/.vortex/cli/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php +++ b/.vortex/cli/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -49,7 +49,6 @@ +@@ -47,7 +47,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', diff --git a/rector.php b/rector.php index 3391a4abf..7c104d65e 100644 --- a/rector.php +++ b/rector.php @@ -17,8 +17,6 @@ declare(strict_types=1); use DrupalFinder\DrupalFinderComposerRuntime; -use DrupalRector\Set\Drupal10SetList; -use DrupalRector\Set\Drupal9SetList; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector; use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; @@ -101,11 +99,10 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Drupal-specific deprecation fixes. - ->withSets([ - Drupal9SetList::DRUPAL_9, - Drupal10SetList::DRUPAL_10, - ]) + // Drupal-specific deprecation fixes. Each rule is bound to a `drupal/core` + // version and runs only when the installed core matches, so the set tracks + // core upgrades without changing this configuration. + ->withComposerBased(drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class,