Skip to content

[#2975] Replaced versioned Drupal Rector sets with the composer-based provider. - #2978

Merged
AlexSkrypnyk merged 4 commits into
mainfrom
feature/fix-rector-main
Aug 13, 2026
Merged

[#2975] Replaced versioned Drupal Rector sets with the composer-based provider.#2978
AlexSkrypnyk merged 4 commits into
mainfrom
feature/fix-rector-main

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Aug 13, 2026

Copy link
Copy Markdown
Member

Closes #2975

Summary

rector/rector 2.6.2 (published 2026-08-12) removed the versioned Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_40 through PHPUNIT_130 constants in favour of composer-based sets, but palantirnet/drupal-rector 1.1.2 still references PHPUnitSetList::PHPUNIT_90 from its Drupal 8/9/10 deprecation configs, which rector.php loaded via Drupal9SetList::DRUPAL_9 and Drupal10SetList::DRUPAL_10. Because the template commits no lock file, CI resolves rector/rector fresh on every run, so Rector aborts with Undefined constant Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90 before analysing anything and fails the lint and vortex-test-workflow checks regardless of what a branch changed.

This branch was green only because nothing had pushed to it since rector/rector 2.6.2 was released: the last push run completed at 03:06Z and 2.6.2 landed at 06:24Z the same day. The next push would have failed the same way 2.x already did.

The versioned set lists are replaced with the composer-based mechanism, which needs two calls that work together: ->withSetProviders(DrupalSetProvider::class) supplies the sets and ->withComposerBased(drupal: TRUE) enables the drupal group. Registering the provider matters - with only withComposerBased(), Rector loads no Drupal rules at all and still exits 0, so lint passes while covering nothing. vendor/bin/rector list-rules reports 0 DrupalRector rules without the provider and 98 with it. Both calls exist in rector/rector 2.6.1 and 2.6.2, so the fix is safe across the whole ^2.6.1 constraint range.

DrupalSetProvider binds each set to a drupal/core version through ComposerTriggeredSet and loads only the sets the installed core satisfies. On drupal/core 11.4.5 that resolves to the Drupal 11.0-11.4 sets plus the version-matched breaking-change sets, and never the Drupal 9 or 10 configs that carry the removed constant. Two consequences follow. Drupal 9 and 10 deprecation rules no longer run against a Drupal 11 site, which is the intended behaviour of the composer-based provider rather than a regression. And the Drupal 11.4 set newly enables PhpUnitAddRunTestsInSeparateProcessesAttributeRector, which adds #[RunTestsInSeparateProcesses] to Kernel and Functional test classes, tracking Drupal core issue 3445240. PHPUnit then runs each of those classes in its own process, which drupal-rector flags as a change to test execution on PHPUnit 10 and 11, not only on Drupal 12.

The same change is applied to 2.x in #2977 and #2979.

Changes

  • Replaced ->withSets([Drupal9SetList::DRUPAL_9, Drupal10SetList::DRUPAL_10]) in the root rector.php with ->withSetProviders(DrupalSetProvider::class) and ->withComposerBased(drupal: TRUE), swapping the DrupalRector\Set\Drupal9SetList and DrupalRector\Set\Drupal10SetList imports for DrupalRector\Set\DrupalSetProvider.
  • Added #[RunTestsInSeparateProcesses] and its PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses import to the 8 example Kernel, Functional and FunctionalJavascript test classes under web/modules/custom/ and web/themes/custom/, so Rector runs clean. Rector emits the attribute fully qualified because the config sets withImportNames(importNames: FALSE); the import is added by hand so the template's example code does not mix an imported Group attribute with a fully qualified one.
  • Regenerated the installer snapshot fixtures with composer update-snapshots, covering the rector.php baseline, the example test files, and the diff-hunk line offsets in the scenario fixtures under .vortex/installer/tests/Fixtures/handler_process/.

Before / After

BEFORE
┌───────────────────────────────────────┐
│ rector.php                            │
│ ->withSets([Drupal9SetList::DRUPAL_9, │
│  Drupal10SetList::DRUPAL_10])         │
└───────────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────────────────────────────┐
│ palantirnet/drupal-rector Drupal 8/9/10 configs         │
│ reference Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90 │
└─────────────────────────────────────────────────────────┘
        │
        ▼
┌──────────────────────────────────────────────────────┐
│ PHPUNIT_90 removed in rector/rector 2.6.2            │
│ FATAL: Undefined constant PHPUnitSetList::PHPUNIT_90 │
│ Rector aborts before analysing any file              │
└──────────────────────────────────────────────────────┘

Result: lint and vortex-test-workflow fail on the next push

AFTER
┌─────────────────────────────────────────────┐
│ rector.php                                  │
│ ->withSetProviders(DrupalSetProvider::class)│
│ ->withComposerBased(drupal: TRUE)           │
└─────────────────────────────────────────────┘
        │
        ▼
┌───────────────────────────────────────────────────┐
│ DrupalSetProvider supplies ComposerTriggeredSets, │
│ withComposerBased() enables the drupal group      │
│ (provider alone omitted => 0 rules, silent)       │
└───────────────────────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────────────────────────┐
│ drupal/core 11.4.5 resolves to the Drupal 11.0-11.4 │
│ sets plus matching breaking-change sets;            │
│ Drupal 9/10 configs (and PHPUNIT_90) never load     │
│ rector list-rules | grep DrupalRector: 98           │
└─────────────────────────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────────────────────┐
│ 11.4 set adds #[RunTestsInSeparateProcesses] to │
│ 8 example Kernel/Functional tests; Rector clean │
│ dry-run exits 0                                 │
└─────────────────────────────────────────────────┘

Result: lint and vortex-test-workflow pass

… set.

'rector/rector' 2.6.2 removed the versioned 'PHPUnitSetList::PHPUNIT_40' through 'PHPUNIT_130' constants in favour of composer-based sets. The 'palantirnet/drupal-rector' Drupal 8, 9 and 10 deprecation configs still reference 'PHPUnitSetList::PHPUNIT_90', so loading 'Drupal9SetList::DRUPAL_9' or 'Drupal10SetList::DRUPAL_10' aborts Rector before it analyses anything.

'withComposerBased(drupal: TRUE)' loads Drupal sets through 'DrupalSetProvider', which binds each set to a 'drupal/core' version and loads only those the installed core satisfies. On Drupal 11 that resolves to the 11.0-11.4 sets and never the Drupal 9 or 10 configs that carry the removed constant.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f037c5b8-27a9-4b45-8576-70b69b7378c8

📥 Commits

Reviewing files that changed from the base of the PR and between 4f42070 and bc49945.

⛔ Files ignored due to path filters (55)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_demo/tests/src/FunctionalJavascript/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/modules/custom/sw_demo/tests/src/Kernel/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/themes/custom/star_wars/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_demo/tests/src/FunctionalJavascript/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/modules/custom/sw_demo/tests/src/Kernel/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/themes/custom/star_wars/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_demo/tests/src/FunctionalJavascript/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/modules/custom/sw_demo/tests/src/Kernel/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/themes/custom/star_wars/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_demo/tests/src/FunctionalJavascript/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/modules/custom/the_force_demo/tests/src/Kernel/CounterBlockTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/themes/custom/lightsaber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/themes/custom/lightsaber/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/themes/custom/lightsaber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_custom/web/themes/custom/light_saber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_custom/web/themes/custom/light_saber/tests/src/FunctionalJavascript/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_custom/web/themes/custom/light_saber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (9)
  • rector.php
  • web/modules/custom/ys_base/tests/src/Functional/ExampleTest.php
  • web/modules/custom/ys_base/tests/src/FunctionalJavascript/ExampleTest.php
  • web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php
  • web/modules/custom/ys_demo/tests/src/FunctionalJavascript/CounterBlockTest.php
  • web/modules/custom/ys_demo/tests/src/Kernel/CounterBlockTest.php
  • web/themes/custom/your_site_theme/tests/src/Functional/ExampleTest.php
  • web/themes/custom/your_site_theme/tests/src/FunctionalJavascript/ExampleTest.php
  • web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php

Walkthrough

The Rector configuration now loads Drupal rules from the installed Composer package. Custom module and theme tests now run in separate processes through PHPUnit attributes.

Changes

Tooling and test isolation

Layer / File(s) Summary
Composer-based Drupal rule loading
rector.php
rector.php registers DrupalSetProvider and loads Drupal rules according to the installed drupal/core version.
Separate-process test execution
web/modules/custom/*/tests/src/{Functional,FunctionalJavascript,Kernel}/*, web/themes/custom/your_site_theme/tests/src/{Functional,FunctionalJavascript,Kernel}/*
The test classes import and apply PHPUnit’s RunTestsInSeparateProcesses attribute.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to bc499

This updates Rector configuration and related fixtures to use the Composer-based Drupal rule set; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

  • drevops/vortex#2823 — Updates related Drupal Rector configuration and dependencies.
  • drevops/vortex#2977 — Replaces versioned Drupal Rector set imports with Composer-based configuration.

Suggested labels: Needs review, A2

Poem

A rabbit sees Composer guide the rules,
And PHPUnit isolate test schools.
Drupal core selects the set,
Each test gets a clean reset.
Hop, hop, the suite is set!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing versioned Drupal Rector sets with a Composer-based set.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix-rector-main

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rector.php`:
- Around line 96-99: Add the DrupalSetProvider import and register
DrupalSetProvider::class with withSetProviders before the existing
withComposerBased(drupal: TRUE) call, preserving the current Drupal-specific
rule configuration.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7e81a13a-e2c0-476f-bc2a-b2c6fea6f6b8

📥 Commits

Reviewing files that changed from the base of the PR and between 7326192 and 4f42070.

⛔ Files ignored due to path filters (16)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_claro/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_olivero/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_stark/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
  • rector.php

Comment thread rector.php Outdated
@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.68%. Comparing base (7326192) to head (bc49945).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2978      +/-   ##
==========================================
- Coverage   87.10%   86.68%   -0.42%     
==========================================
  Files         101       94       -7     
  Lines        4817     4658     -159     
  Branches       47        3      -44     
==========================================
- Hits         4196     4038     -158     
+ Misses        621      620       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6a7d213d7d7da8873f2f5e18--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

…4 test attribute.

'withComposerBased(drupal: TRUE)' only enables the 'drupal' set group; the sets themselves come from 'DrupalRector\Set\DrupalSetProvider', which must be registered with 'withSetProviders()'. Without it Rector loaded no Drupal rules at all and still exited 0, so lint passed while silently covering nothing. 'rector list-rules' reports 98 'DrupalRector' rules with the provider registered and 0 without it.

Loading the Drupal 11 sets newly enables 'PhpUnitAddRunTestsInSeparateProcessesAttributeRector' from the 11.4 set, which adds '#[RunTestsInSeparateProcesses]' to Kernel and Functional test classes. The attribute and its import are applied to the example tests so Rector runs clean. PHPUnit runs each of those classes in its own process.
@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.56% (206/209)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.56% (206/209)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
AlexSkrypnyk merged commit e8451d3 into main Aug 13, 2026
36 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/fix-rector-main branch August 13, 2026 01:51
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Aug 13, 2026
@AlexSkrypnyk AlexSkrypnyk changed the title [#2975] Replaced versioned Drupal Rector sets with the composer-based set. [#2975] Replaced versioned Drupal Rector sets with the composer-based provider. Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Rector aborts on a removed PHPUnit set constant, failing lint on every branch

1 participant