From 8f6616486e26e3936eaf13dfa308ad3dfbc20987 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:29:36 +1000 Subject: [PATCH 1/7] [#3070] Restored Drupal Rector sets by holding 'rector/rector' below 2.6.5. Rector 2.6.5 disabled 'withSetProviders()' and mis-scoped 'DrupalSetList', leaving the Drupal sets unloaded without any error. Constrained the dependency to the last release where the documented configuration works. Dropped the hand-rolled autoload paths and file extensions, which the Drupal sets already provide, and called 'withPhpSets()' without an argument so the target version follows 'composer.json'. Widened 'withComposerBased()' to Twig, PHPUnit and Symfony, which removes a redundant 'expects(any())' from 'MockTrait'. --- composer.json | 2 +- rector.php | 41 ++++--------------- renovate.json | 12 ++++++ .../ys_base/tests/src/Traits/MockTrait.php | 6 +-- 4 files changed, 25 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 2d41023e8..f8366127b 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "phpstan/phpstan": "^2.2.10", "phpunit/phpunit": "^11.5.56", "pyrech/composer-changelogs": "^2.2", - "rector/rector": "^2.6.4", + "rector/rector": ">=2.6.4 <2.6.5", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "^4.1.0" }, diff --git a/rector.php b/rector.php index e7b267b5d..14caa7156 100644 --- a/rector.php +++ b/rector.php @@ -16,7 +16,6 @@ declare(strict_types=1); -use DrupalFinder\DrupalFinderComposerRuntime; use DrupalRector\Set\DrupalSetProvider; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector; @@ -81,9 +80,9 @@ '*/vendor/*', '*/node_modules/*', ]) - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() #;< TOOL_BEHAT // Behat attribute sets - converts annotations to PHP 8 attributes. ->withAttributesSets(behat: TRUE) @@ -97,39 +96,17 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Drupal-specific deprecation fixes. The provider binds each set to a - // `drupal/core` version and only the sets the installed core satisfies are - // loaded, so the set tracks core upgrades without changing this - // configuration. Both calls are required: the provider supplies the sets, - // `withComposerBased()` enables the group. + // Deprecation fixes for the installed versions of Drupal, Twig, PHPUnit and + // Symfony. Both calls are required: the provider supplies the sets, + // `withComposerBased()` enables the group. The Drupal sets carry the autoload + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. ->withSetProviders(DrupalSetProvider::class) - ->withComposerBased(drupal: TRUE) + ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { - $drupalFinder = new DrupalFinderComposerRuntime(); - $drupalRoot = $drupalFinder->getDrupalRoot(); - - return [ - $drupalRoot . '/core', - $drupalRoot . '/modules', - $drupalRoot . '/themes', - $drupalRoot . '/profiles', - ]; - })()) - // Drupal file extensions. - ->withFileExtensions([ - 'php', - 'module', - 'install', - 'profile', - 'theme', - 'inc', - 'engine', - ]) // Import configuration. ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/renovate.json b/renovate.json index 050099d7a..f87ddba7f 100644 --- a/renovate.json +++ b/renovate.json @@ -52,6 +52,18 @@ ], "enabled": false }, + { + "groupName": "Rector - Held below 2.6.5 - Skipped to update manually", + "groupSlug": "php-rector", + "description": "Rector 2.6.5 disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ + "rector/rector" + ], + "matchManagers": [ + "composer" + ], + "enabled": false + }, { "description": "Workaround for https://github.com/renovatebot/renovate/issues/24993: avoid bumping constraints with stability flags.", "matchManagers": [ diff --git a/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php b/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php index 80cc0071d..fd1065475 100644 --- a/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php +++ b/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock->expects($this->any()) + $mock ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock->expects($this->any()) + $mock ->method($method) ->willReturnCallback($value); } else { - $mock->expects($this->any()) + $mock ->method($method) ->willReturn($value); } From 129059731a6adcdd67e4f081f398315d33dafcf0 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:29:47 +1000 Subject: [PATCH 2/7] Updated snapshots. --- .../handler_process/_baseline/composer.json | 2 +- .../handler_process/_baseline/rector.php | 41 ++++--------------- .../handler_process/_baseline/renovate.json | 12 ++++++ .../sw_base/tests/src/Traits/MockTrait.php | 6 +-- .../sw_base/tests/src/Traits/MockTrait.php | 6 +-- .../handler_process/hosting_acquia/rector.php | 6 +-- .../sw_base/tests/src/Traits/MockTrait.php | 6 +-- .../hosting_project_name___acquia/rector.php | 6 +-- .../tests/src/Traits/MockTrait.php | 6 +-- .../handler_process/theme_claro/rector.php | 4 +- .../handler_process/theme_olivero/rector.php | 4 +- .../handler_process/theme_stark/rector.php | 4 +- .../tools_groups_no_be_lint/composer.json | 2 +- .../tools_groups_no_be_lint/renovate.json | 11 +++++ .../composer.json | 2 +- .../renovate.json | 11 +++++ .../tools_groups_no_be_tests/composer.json | 2 +- .../tools_groups_no_be_tests/rector.php | 20 +++++---- .../composer.json | 2 +- .../rector.php | 20 +++++---- .../rector.php | 4 +- .../rector.php | 4 +- .../handler_process/tools_no_behat/rector.php | 8 ++-- .../tools_no_behat_circleci/rector.php | 8 ++-- .../tools_no_eslint_no_theme/rector.php | 4 +- .../tools_no_phpstan/composer.json | 2 +- .../tools_no_phpstan_circleci/composer.json | 2 +- .../tools_no_phpunit/composer.json | 2 +- .../tools_no_phpunit/rector.php | 12 ++++-- .../tools_no_phpunit_circleci/composer.json | 2 +- .../tools_no_phpunit_circleci/rector.php | 12 ++++-- .../tools_no_rector/composer.json | 2 +- .../tools_no_rector/renovate.json | 11 +++++ .../tools_no_rector_circleci/composer.json | 2 +- .../tools_no_rector_circleci/renovate.json | 11 +++++ .../tools_no_stylelint_no_theme/rector.php | 4 +- .../tools_no_twig/composer.json | 2 +- .../tools_no_twig_circleci/composer.json | 2 +- .../handler_process/tools_none/composer.json | 2 +- .../handler_process/tools_none/renovate.json | 11 +++++ 40 files changed, 170 insertions(+), 110 deletions(-) create mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json create mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json create mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json create mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json create mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json b/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json index 05389a571..af8aa0472 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json @@ -57,7 +57,7 @@ "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php index 3f8cae2d4..71f8a6e13 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php @@ -16,7 +16,6 @@ declare(strict_types=1); -use DrupalFinder\DrupalFinderComposerRuntime; use DrupalRector\Set\DrupalSetProvider; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector; @@ -81,9 +80,9 @@ '*/vendor/*', '*/node_modules/*', ]) - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() // Behat attribute sets - converts annotations to PHP 8 attributes. ->withAttributesSets(behat: TRUE) // Code quality improvement sets. @@ -95,39 +94,17 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Drupal-specific deprecation fixes. The provider binds each set to a - // `drupal/core` version and only the sets the installed core satisfies are - // loaded, so the set tracks core upgrades without changing this - // configuration. Both calls are required: the provider supplies the sets, - // `withComposerBased()` enables the group. + // Deprecation fixes for the installed versions of Drupal, Twig, PHPUnit and + // Symfony. Both calls are required: the provider supplies the sets, + // `withComposerBased()` enables the group. The Drupal sets carry the autoload + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. ->withSetProviders(DrupalSetProvider::class) - ->withComposerBased(drupal: TRUE) + ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { - $drupalFinder = new DrupalFinderComposerRuntime(); - $drupalRoot = $drupalFinder->getDrupalRoot(); - - return [ - $drupalRoot . '/core', - $drupalRoot . '/modules', - $drupalRoot . '/themes', - $drupalRoot . '/profiles', - ]; - })()) - // Drupal file extensions. - ->withFileExtensions([ - 'php', - 'module', - 'install', - 'profile', - 'theme', - 'inc', - 'engine', - ]) // Import configuration. ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json index 865b120b9..09a62b222 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json @@ -49,6 +49,18 @@ ], "enabled": false }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", + "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ + "rector/rector" + ], + "matchManagers": [ + "composer" + ], + "enabled": false + }, { "description": "Workaround for https://github.com/renovatebot/renovate/issues/24993: avoid bumping constraints with stability flags.", "matchManagers": [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 00f6200f2..5fb55941b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock->expects($this->any()) + $mock ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock->expects($this->any()) + $mock ->method($method) ->willReturnCallback($value); } else { - $mock->expects($this->any()) + $mock ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 00f6200f2..5fb55941b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock->expects($this->any()) + $mock ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock->expects($this->any()) + $mock ->method($method) ->willReturnCallback($value); } else { - $mock->expects($this->any()) + $mock ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php index f73607a8b..f75f90052 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php @@ -1,4 +1,4 @@ -@@ -44,10 +44,10 @@ +@@ -43,10 +43,10 @@ return RectorConfig::configure() ->withPaths([ @@ -13,7 +13,7 @@ __DIR__ . '/tests', ]) ->withSkip([ -@@ -65,8 +65,8 @@ +@@ -64,8 +64,8 @@ PrivatizeLocalGetterToPropertyRector::class, RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ @@ -24,7 +24,7 @@ ], RenameForeachValueVariableToMatchExprVariableRector::class, RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class, -@@ -75,7 +75,7 @@ +@@ -74,7 +74,7 @@ RenameVariableToMatchNewTypeRector::class, SimplifyEmptyCheckOnEmptyArrayRector::class, StringClassNameToClassConstantRector::class => [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 00f6200f2..5fb55941b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock->expects($this->any()) + $mock ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock->expects($this->any()) + $mock ->method($method) ->willReturnCallback($value); } else { - $mock->expects($this->any()) + $mock ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php index f73607a8b..f75f90052 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php @@ -1,4 +1,4 @@ -@@ -44,10 +44,10 @@ +@@ -43,10 +43,10 @@ return RectorConfig::configure() ->withPaths([ @@ -13,7 +13,7 @@ __DIR__ . '/tests', ]) ->withSkip([ -@@ -65,8 +65,8 @@ +@@ -64,8 +64,8 @@ PrivatizeLocalGetterToPropertyRector::class, RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ @@ -24,7 +24,7 @@ ], RenameForeachValueVariableToMatchExprVariableRector::class, RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class, -@@ -75,7 +75,7 @@ +@@ -74,7 +74,7 @@ RenameVariableToMatchNewTypeRector::class, SimplifyEmptyCheckOnEmptyArrayRector::class, StringClassNameToClassConstantRector::class => [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php index 5687af401..ab333bc40 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock->expects($this->any()) + $mock ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock->expects($this->any()) + $mock ->method($method) ->willReturnCallback($value); } else { - $mock->expects($this->any()) + $mock ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php b/.vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php b/.vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php b/.vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json index 116057d41..3bde0b219 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json @@ -21,7 +21,7 @@ - "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", -- "rector/rector": "__VERSION__", +- "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json new file mode 100644 index 000000000..de3c80903 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json @@ -0,0 +1,11 @@ +@@ -51,10 +51,8 @@ + }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", +- "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ +- "rector/rector" + ], + "matchManagers": [ + "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json index 116057d41..3bde0b219 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json @@ -21,7 +21,7 @@ - "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", -- "rector/rector": "__VERSION__", +- "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json new file mode 100644 index 000000000..de3c80903 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json @@ -0,0 +1,11 @@ +@@ -51,10 +51,8 @@ + }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", +- "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ +- "rector/rector" + ], + "matchManagers": [ + "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json index 0daa19e38..b769f649c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json @@ -23,7 +23,7 @@ "phpstan/phpstan": "__VERSION__", - "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", @@ -72,11 +64,6 @@ ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php index 696b79cd5..ccf4be642 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php @@ -1,4 +1,4 @@ -@@ -36,7 +36,6 @@ +@@ -35,7 +35,6 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; @@ -6,20 +6,24 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -84,8 +83,6 @@ - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) +@@ -83,8 +82,6 @@ + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() - // Behat attribute sets - converts annotations to PHP 8 attributes. - ->withAttributesSets(behat: TRUE) // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -105,7 +102,6 @@ +@@ -100,11 +97,9 @@ + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. + ->withSetProviders(DrupalSetProvider::class) +- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, - YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { + // Import configuration. + ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json index 0daa19e38..b769f649c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json @@ -23,7 +23,7 @@ "phpstan/phpstan": "__VERSION__", - "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", @@ -72,11 +64,6 @@ ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php index 696b79cd5..ccf4be642 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -36,7 +36,6 @@ +@@ -35,7 +35,6 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; @@ -6,20 +6,24 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -84,8 +83,6 @@ - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) +@@ -83,8 +82,6 @@ + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() - // Behat attribute sets - converts annotations to PHP 8 attributes. - ->withAttributesSets(behat: TRUE) // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -105,7 +102,6 @@ +@@ -100,11 +97,9 @@ + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. + ->withSetProviders(DrupalSetProvider::class) +- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, - YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { + // Import configuration. + ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php index 16c9a86b0..b032c984e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php @@ -1,7 +1,7 @@ -@@ -84,8 +84,6 @@ - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) +@@ -83,8 +83,6 @@ + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() - // Behat attribute sets - converts annotations to PHP 8 attributes. - ->withAttributesSets(behat: TRUE) // Code quality improvement sets. diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php index 16c9a86b0..b032c984e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php @@ -1,7 +1,7 @@ -@@ -84,8 +84,6 @@ - // PHP version upgrade sets - modernizes syntax to PHP 8.4. - // Includes all rules from PHP 5.3 through 8.4. - ->withPhpSets(php84: TRUE) +@@ -83,8 +83,6 @@ + // PHP version upgrade sets. Called without an argument, the target version + // comes from `composer.json`, so the sets follow the project's PHP version. + ->withPhpSets() - // Behat attribute sets - converts annotations to PHP 8 attributes. - ->withAttributesSets(behat: TRUE) // Code quality improvement sets. diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json index cd31a9e10..17bfb5b10 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json @@ -11,7 +11,7 @@ - "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", @@ -85,7 +82,6 @@ "drupal/core-composer-scaffold": true, "ergebnis/composer-normalize": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json index cd31a9e10..17bfb5b10 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json @@ -11,7 +11,7 @@ - "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", @@ -85,7 +82,6 @@ "drupal/core-composer-scaffold": true, "ergebnis/composer-normalize": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json index 8f0d5a8f3..31709efbe 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json @@ -7,7 +7,7 @@ "phpstan/phpstan": "__VERSION__", - "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", @@ -72,11 +70,6 @@ ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php index 6f6084748..80257e1eb 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php @@ -1,4 +1,4 @@ -@@ -36,7 +36,6 @@ +@@ -35,7 +35,6 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; @@ -6,11 +6,15 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -105,7 +104,6 @@ +@@ -100,11 +99,9 @@ + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. + ->withSetProviders(DrupalSetProvider::class) +- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, - YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { + // Import configuration. + ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json index 8f0d5a8f3..31709efbe 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json @@ -7,7 +7,7 @@ "phpstan/phpstan": "__VERSION__", - "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", @@ -72,11 +70,6 @@ ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php index 6f6084748..80257e1eb 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php @@ -1,4 +1,4 @@ -@@ -36,7 +36,6 @@ +@@ -35,7 +35,6 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; @@ -6,11 +6,15 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -105,7 +104,6 @@ +@@ -100,11 +99,9 @@ + // paths and the file extensions Drupal executes PHP from, so this file + // declares neither. + ->withSetProviders(DrupalSetProvider::class) +- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, - YieldDataProviderRector::class, ]) - // Configure Drupal autoloading. - ->withAutoloadPaths((function (): array { + // Import configuration. + ->withImportNames(importNames: FALSE, importDocBlockNames: FALSE); diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json index 095c85d4a..97ac61cdc 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json @@ -10,7 +10,7 @@ "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", -- "rector/rector": "__VERSION__", +- "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json new file mode 100644 index 000000000..de3c80903 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json @@ -0,0 +1,11 @@ +@@ -51,10 +51,8 @@ + }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", +- "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ +- "rector/rector" + ], + "matchManagers": [ + "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json index 095c85d4a..97ac61cdc 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json @@ -10,7 +10,7 @@ "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", -- "rector/rector": "__VERSION__", +- "rector/rector": ">=__VERSION__ <__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json new file mode 100644 index 000000000..de3c80903 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json @@ -0,0 +1,11 @@ +@@ -51,10 +51,8 @@ + }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", +- "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ +- "rector/rector" + ], + "matchManagers": [ + "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php index 9b6af1d93..c7a7ea853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php @@ -1,4 +1,4 @@ -@@ -45,7 +45,6 @@ +@@ -44,7 +44,6 @@ return RectorConfig::configure() ->withPaths([ __DIR__ . '/web/modules/custom', @@ -6,7 +6,7 @@ __DIR__ . '/web/sites/default/settings.php', __DIR__ . '/web/sites/default/includes', __DIR__ . '/tests', -@@ -66,7 +65,6 @@ +@@ -65,7 +64,6 @@ RemoveAlwaysTrueIfConditionRector::class, RemoveUnusedPublicMethodParameterRector::class => [ __DIR__ . '/web/modules/custom/*/src/Hook/*', diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json index 2541c6937..762618e52 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json @@ -1,7 +1,7 @@ @@ -58,8 +58,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", - "softcreatr/jsonpath": "^0.10 || ^1.0", - "vincentlanglet/twig-cs-fixer": "__VERSION__" + "softcreatr/jsonpath": "^0.10 || ^1.0" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json index 2541c6937..762618e52 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json @@ -1,7 +1,7 @@ @@ -58,8 +58,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", - "rector/rector": "__VERSION__", + "rector/rector": ">=__VERSION__ <__VERSION__", - "softcreatr/jsonpath": "^0.10 || ^1.0", - "vincentlanglet/twig-cs-fixer": "__VERSION__" + "softcreatr/jsonpath": "^0.10 || ^1.0" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json index 5128b7d12..98fc28279 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json @@ -23,7 +23,7 @@ - "phpstan/phpstan": "__VERSION__", - "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", -- "rector/rector": "__VERSION__", +- "rector/rector": ">=__VERSION__ <__VERSION__", - "softcreatr/jsonpath": "^0.10 || ^1.0", - "vincentlanglet/twig-cs-fixer": "__VERSION__" + "softcreatr/jsonpath": "^0.10 || ^1.0" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json new file mode 100644 index 000000000..de3c80903 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json @@ -0,0 +1,11 @@ +@@ -51,10 +51,8 @@ + }, + { + "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", +- "groupSlug": "php-rector", + "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", + "matchDepNames": [ +- "rector/rector" + ], + "matchManagers": [ + "composer" From 6d7ef9976edd149a7c083dbbd6ee7cb4ec39ac8c Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:33:01 +1000 Subject: [PATCH 3/7] Removed the Renovate hold for 'rector/rector'. The installer strips every line matching the word 'rector' from tool config, which reduced the rule to an entry with an empty 'matchDepNames' on projects that deselect Rector. The Composer constraint already blocks the affected release. --- renovate.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/renovate.json b/renovate.json index f87ddba7f..050099d7a 100644 --- a/renovate.json +++ b/renovate.json @@ -52,18 +52,6 @@ ], "enabled": false }, - { - "groupName": "Rector - Held below 2.6.5 - Skipped to update manually", - "groupSlug": "php-rector", - "description": "Rector 2.6.5 disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ - "rector/rector" - ], - "matchManagers": [ - "composer" - ], - "enabled": false - }, { "description": "Workaround for https://github.com/renovatebot/renovate/issues/24993: avoid bumping constraints with stability flags.", "matchManagers": [ From d2d4ce729091431516f8bb99a169a3ead3174238 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:33:10 +1000 Subject: [PATCH 4/7] Updated snapshots. --- .../Fixtures/handler_process/_baseline/renovate.json | 12 ------------ .../tools_groups_no_be_lint/renovate.json | 11 ----------- .../tools_groups_no_be_lint_circleci/renovate.json | 11 ----------- .../handler_process/tools_no_rector/renovate.json | 11 ----------- .../tools_no_rector_circleci/renovate.json | 11 ----------- .../handler_process/tools_none/renovate.json | 11 ----------- 6 files changed, 67 deletions(-) delete mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json delete mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json delete mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json delete mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json delete mode 100644 .vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json index 09a62b222..865b120b9 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/renovate.json @@ -49,18 +49,6 @@ ], "enabled": false }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", - "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ - "rector/rector" - ], - "matchManagers": [ - "composer" - ], - "enabled": false - }, { "description": "Workaround for https://github.com/renovatebot/renovate/issues/24993: avoid bumping constraints with stability flags.", "matchManagers": [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json deleted file mode 100644 index de3c80903..000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/renovate.json +++ /dev/null @@ -1,11 +0,0 @@ -@@ -51,10 +51,8 @@ - }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", -- "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ -- "rector/rector" - ], - "matchManagers": [ - "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json deleted file mode 100644 index de3c80903..000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/renovate.json +++ /dev/null @@ -1,11 +0,0 @@ -@@ -51,10 +51,8 @@ - }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", -- "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ -- "rector/rector" - ], - "matchManagers": [ - "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json deleted file mode 100644 index de3c80903..000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/renovate.json +++ /dev/null @@ -1,11 +0,0 @@ -@@ -51,10 +51,8 @@ - }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", -- "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ -- "rector/rector" - ], - "matchManagers": [ - "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json deleted file mode 100644 index de3c80903..000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/renovate.json +++ /dev/null @@ -1,11 +0,0 @@ -@@ -51,10 +51,8 @@ - }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", -- "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ -- "rector/rector" - ], - "matchManagers": [ - "composer" diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json b/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json deleted file mode 100644 index de3c80903..000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_none/renovate.json +++ /dev/null @@ -1,11 +0,0 @@ -@@ -51,10 +51,8 @@ - }, - { - "groupName": "Rector - Held below __VERSION__ - Skipped to update manually", -- "groupSlug": "php-rector", - "description": "Rector __VERSION__ disabled 'withSetProviders()' and prefixed 'DrupalRector\\Set\\DrupalSetList' during scoping, so neither route to the Drupal sets works. Tracked in https://github.com/drevops/vortex/issues/3070.", - "matchDepNames": [ -- "rector/rector" - ], - "matchManagers": [ - "composer" From ced0e7e65e18564b394a41ff11dcef598a630dbd Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:37:33 +1000 Subject: [PATCH 5/7] Narrowed 'withComposerBased()' back to the Drupal sets. The PHPUnit tool removes every line matching 'phpunit' from the shipped configuration, which deleted the whole call on projects that deselect PHPUnit and left the Drupal sets unloaded. --- rector.php | 11 +++++------ .../custom/ys_base/tests/src/Traits/MockTrait.php | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/rector.php b/rector.php index 14caa7156..cd506a9b8 100644 --- a/rector.php +++ b/rector.php @@ -96,13 +96,12 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Deprecation fixes for the installed versions of Drupal, Twig, PHPUnit and - // Symfony. Both calls are required: the provider supplies the sets, - // `withComposerBased()` enables the group. The Drupal sets carry the autoload - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. + // Drupal deprecation fixes for the installed `drupal/core` version. Both + // calls are required: the provider supplies the sets, `withComposerBased()` + // enables the group. The sets carry the autoload paths and the file + // extensions Drupal executes PHP from, so this file declares neither. ->withSetProviders(DrupalSetProvider::class) - ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) + ->withComposerBased(drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php b/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php index fd1065475..80cc0071d 100644 --- a/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php +++ b/web/modules/custom/ys_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock + $mock->expects($this->any()) ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock + $mock->expects($this->any()) ->method($method) ->willReturnCallback($value); } else { - $mock + $mock->expects($this->any()) ->method($method) ->willReturn($value); } From 02463ea4c893436d9c940969fe7b0941bbd84565 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 13:37:42 +1000 Subject: [PATCH 6/7] Updated snapshots. --- .../Fixtures/handler_process/_baseline/rector.php | 11 +++++------ .../custom/sw_base/tests/src/Traits/MockTrait.php | 6 +++--- .../custom/sw_base/tests/src/Traits/MockTrait.php | 6 +++--- .../custom/sw_base/tests/src/Traits/MockTrait.php | 6 +++--- .../the_force_base/tests/src/Traits/MockTrait.php | 6 +++--- .../tools_groups_no_be_tests/rector.php | 6 +----- .../tools_groups_no_be_tests_circleci/rector.php | 6 +----- .../handler_process/tools_no_phpunit/rector.php | 6 +----- .../tools_no_phpunit_circleci/rector.php | 6 +----- 9 files changed, 21 insertions(+), 38 deletions(-) diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php index 71f8a6e13..b8fb83a3f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php @@ -94,13 +94,12 @@ privatization: TRUE, typeDeclarations: TRUE, ) - // Deprecation fixes for the installed versions of Drupal, Twig, PHPUnit and - // Symfony. Both calls are required: the provider supplies the sets, - // `withComposerBased()` enables the group. The Drupal sets carry the autoload - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. + // Drupal deprecation fixes for the installed `drupal/core` version. Both + // calls are required: the provider supplies the sets, `withComposerBased()` + // enables the group. The sets carry the autoload paths and the file + // extensions Drupal executes PHP from, so this file declares neither. ->withSetProviders(DrupalSetProvider::class) - ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) + ->withComposerBased(drupal: TRUE) // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 5fb55941b..00f6200f2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock + $mock->expects($this->any()) ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock + $mock->expects($this->any()) ->method($method) ->willReturnCallback($value); } else { - $mock + $mock->expects($this->any()) ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 5fb55941b..00f6200f2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock + $mock->expects($this->any()) ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock + $mock->expects($this->any()) ->method($method) ->willReturnCallback($value); } else { - $mock + $mock->expects($this->any()) ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php index 5fb55941b..00f6200f2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock + $mock->expects($this->any()) ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock + $mock->expects($this->any()) ->method($method) ->willReturnCallback($value); } else { - $mock + $mock->expects($this->any()) ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php b/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php index ab333bc40..5687af401 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php @@ -48,17 +48,17 @@ protected function prepareMock(string $class, array $methods_map = [], array|boo foreach ($methods_map as $method => $value) { if ($value instanceof Stub) { - $mock + $mock->expects($this->any()) ->method($method) ->will($value); } elseif (is_callable($value)) { - $mock + $mock->expects($this->any()) ->method($method) ->willReturnCallback($value); } else { - $mock + $mock->expects($this->any()) ->method($method) ->willReturn($value); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php index ccf4be642..c8109937d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php @@ -15,11 +15,7 @@ // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -100,11 +97,9 @@ - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. - ->withSetProviders(DrupalSetProvider::class) -- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) +@@ -103,7 +100,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php index ccf4be642..c8109937d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php @@ -15,11 +15,7 @@ // Code quality improvement sets. ->withPreparedSets( codeQuality: TRUE, -@@ -100,11 +97,9 @@ - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. - ->withSetProviders(DrupalSetProvider::class) -- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) +@@ -103,7 +100,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php index 80257e1eb..09dd85457 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php @@ -6,11 +6,7 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -100,11 +99,9 @@ - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. - ->withSetProviders(DrupalSetProvider::class) -- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) +@@ -103,7 +102,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php index 80257e1eb..09dd85457 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php @@ -6,11 +6,7 @@ use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; -@@ -100,11 +99,9 @@ - // paths and the file extensions Drupal executes PHP from, so this file - // declares neither. - ->withSetProviders(DrupalSetProvider::class) -- ->withComposerBased(twig: TRUE, phpunit: TRUE, symfony: TRUE, drupal: TRUE) +@@ -103,7 +102,6 @@ // Additional rules. ->withRules([ DeclareStrictTypesRector::class, From 57ef2eb1b7f2662367215cb49f7c5a091502f968 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 31 Aug 2026 18:23:06 +1000 Subject: [PATCH 7/7] [#3070] Added a Rector check that fails when the Drupal rule sets stop loading. Rector reports success when its rule sets load nothing, so the existing lint assertions passed while no Drupal rule ran. The new subtest seeds a deprecated call that only those rules rewrite and asserts both that the run fails and that the output names the rule, so an unrelated rule firing on the same file cannot mask a set that stopped loading. --- .../phpunit/Functional/AhoyWorkflowTest.php | 2 + .../Traits/Subtests/SubtestAhoyTrait.php | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php b/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php index e6d4314e2..827f41749 100644 --- a/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php +++ b/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php @@ -62,6 +62,8 @@ public function testAhoyWorkflowStateless(): void { $this->subtestAhoyLintBe(); + $this->subtestAhoyLintBeRector(); + $this->subtestAhoyLintFe(); $this->subtestAhoyLintSdc(); diff --git a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php index 7cf7b03b2..f16d1ed93 100644 --- a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php +++ b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php @@ -458,6 +458,48 @@ protected function subtestAhoyLintBe(string $webroot = 'web'): void { $this->logStepFinish(); } + protected function subtestAhoyLintBeRector(string $webroot = 'web'): void { + $this->logStepStart(); + + // Rector reports success when its rule sets load nothing, so a passing + // `ahoy lint-be` is not evidence that the Drupal rules ran. Seed a + // deprecation that only those rules rewrite: the run has to fail, and the + // failure has to name the rule that caught it, because an unrelated rule + // firing on this file would otherwise mask a set that stopped loading. + $this->logSubstep('Assert that the Drupal Rector rule sets are loaded'); + $test_file = $webroot . '/modules/custom/sw_base/src/RectorCanary.php'; + $canary = <<<'PHP' + syncToContainer($test_file); + + $this->cmdFail('ahoy cli vendor/bin/rector --dry-run --clear-cache', ['* FunctionToStaticRector'], tio: 300, ito: 180, txt: '`rector` fails and names the rule that rewrote a deprecated Drupal call'); + + $this->removePathHostAndContainer($test_file); + + $this->logStepFinish(); + } + protected function subtestAhoyLintFe(string $webroot = 'web'): void { $this->logStepStart();