Skip to content

Removed Composer requirements that top-level packages already provide and skipped two Rector rules for the resulting version change. - #3093

Merged
AlexSkrypnyk merged 3 commits into
mainfrom
feature/deps-transitive
Sep 6, 2026
Merged

Removed Composer requirements that top-level packages already provide and skipped two Rector rules for the resulting version change.#3093
AlexSkrypnyk merged 3 commits into
mainfrom
feature/deps-transitive

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

This removes five root Composer requirements that are already guaranteed by packages the project depends on directly, so each version range is owned by the package that actually needs it instead of being duplicated at the root. webflo/drupal-finder moves out of the production require section entirely, since only dev packages ever needed it. Dropping the rector/rector pin also requires bumping palantirnet/drupal-rector to ^1.1.3, the release that added its own upper-bound conflict on Rector, and rector.php gains two rule skips to keep ahoy lint-be clean against the Rector version Composer now resolves to below that boundary.

Changes

Root Composer requirements removed

Each of these is dropped because a package already in composer.json guarantees an equivalent or tighter constraint:

Package removed Section Now guaranteed by
rector/rector (was pinned >=2.6.4 <2.6.5) require-dev palantirnet/drupal-rector requires rector/rector: ^2
dealerdirect/phpcodesniffer-composer-installer ^1.2.1 require-dev drupal/coder, drevops/phpcs-standard and phpcompatibility/php-compatibility each require it
lullabot/mink-selenium2-driver ^1.7.4 require-dev drupal/drupal-extension requires the identical ^1.7.4
lullabot/php-webdriver ^2.0.7 require-dev lullabot/mink-selenium2-driver requires ^2.0.6
webflo/drupal-finder ^1.3.1 require (production) drupal/drupal-extension, mglaman/phpstan-drupal and palantirnet/drupal-rector, all of which are dev packages

webflo/drupal-finder is worth calling out separately: no production package required it and no project code references it, so it was being installed into production builds for nothing, and it now resolves only in the dev dependency set.

Why the rector/rector pin could be removed

The pin >=2.6.4 <2.6.5 was a manual workaround for palantirnet/drupal-rector not declaring an upper bound on Rector. palantirnet/drupal-rector 1.1.3, released 2026-09-03, added conflict: {"rector/rector": ">=2.6.2"}, so the compatible range is now declared upstream and a local pin can only fight it. The root constraint is removed and palantirnet/drupal-rector is bumped from ^1.1.2 to ^1.1.3 so the conflict-carrying release is guaranteed.

Resolution consequence and the two new Rector skips

With the pin gone, Composer resolves palantirnet/drupal-rector 1.1.3 and rector/rector 2.6.1, the highest release below the upstream conflict boundary. Rector 2.6.2 removed the per-version set providers that withSetProviders(DrupalSetProvider::class) in rector.php depends on, which is exactly what the upstream conflict protects against. The Drupal rule sets were verified to still load at 2.6.1: seeding a deprecated drupal_requirements_severity() call makes Rector rewrite it via FunctionToStaticRector, matching the existing CI guard for that behavior.

Rector 2.6.2 also deprecated DisallowedEmptyRuleFixerRector and dropped AddOverrideAttributeToOverriddenMethodsRector from the PHP 8.3 set, so at 2.6.1 both rules are still active. Together they reported 14 changes across the template's own code: DisallowedEmptyRuleFixerRector rewriting !empty($x) into !(in_array($x, ['', '0'], true) || ...), and AddOverrideAttributeToOverriddenMethodsRector adding #[\Override] attributes the template does not use. Both are added to the existing withSkip() list, which already collects rules the project declines on coding-standard grounds, and ahoy lint-be is clean after the skips.

Packages deliberately kept

These are also available transitively but stay as direct requirements because the project invokes their binaries directly and owns their version choice, and no top-level package authoritatively bounds them:

  • behat/behat, run via ahoy test-bdd and configured by behat.yml
  • phpunit/phpunit, configured by phpunit.xml; only phpspec/prophecy-phpunit pulls it in, with a permissive ^9.1 || ... || ^13.0
  • phpstan/phpstan, configured by phpstan.neon
  • drupal/core-composer-scaffold, configured by the root's extra.drupal-scaffold and conventionally declared directly by Drupal projects
  • drupal/search_api, enabled directly by scripts/provision-00-enable-demo-modules.sh

Documentation and installer fixtures

  • .vortex/docs/content/development/composer.mdx: removed the five dropped packages from the require and require-dev tables, and updated the palantirnet/drupal-rector row to note that it installs and constrains rector/rector.
  • .vortex/installer/tests/Fixtures/handler_process/**: regenerated snapshots. The installer's Tools handler still calls removeSubNode for rector/rector and dealerdirect/phpcodesniffer-composer-installer so that consumer projects carrying those entries from an earlier template version are still cleaned up; those calls are now no-ops against the current template, mirroring the existing handling of squizlabs/php_codesniffer.

Screenshots

N/A

Before / After

Who owns the Rector version range:

BEFORE - the root pin and the consuming package disagree

  composer.json (require-dev)
  ┌────────────────────────────────────────┐
  │ rector/rector:  >=2.6.4 <2.6.5         │ <- pinned by hand
  │ palantirnet/drupal-rector:  ^1.1.2     │ <- declares no upper bound
  └───────────────────┬────────────────────┘
                      │
                      ▼
              rector/rector 2.6.4
      range owned by the root, not by the
      package that actually consumes it


AFTER - the consuming package owns the range

  composer.json (require-dev)
  ┌────────────────────────────────────────┐
  │ palantirnet/drupal-rector:  ^1.1.3     │
  └───────────────────┬────────────────────┘
                      │
                      ▼
      palantirnet/drupal-rector 1.1.3
      require:   rector/rector ^2
      conflict:  rector/rector >=2.6.2
                      │
                      ▼
              rector/rector 2.6.1
      highest release below the boundary

What the root declares:

BEFORE - the root repeats what its dependencies already declare

  require
    drush/drush
    webflo/drupal-finder             <- no production package needs it
  require-dev
    rector/rector                    <- pinned by hand
    dealerdirect/phpcodesniffer-...  <- required by drupal/coder
    lullabot/mink-selenium2-driver   <- required by drupal/drupal-extension
    lullabot/php-webdriver           <- required by the driver above
    drupal/coder
    drupal/drupal-extension
    palantirnet/drupal-rector

AFTER - the root declares only what it uses directly

  require
    drush/drush
  require-dev
    palantirnet/drupal-rector  ──>  rector/rector
    drupal/coder               ──>  dealerdirect/phpcodesniffer-composer-installer
    drupal/drupal-extension    ──>  lullabot/mink-selenium2-driver
                               │      └──>  lullabot/php-webdriver
                               └──>  webflo/drupal-finder

Summary by CodeRabbit

  • Documentation

    • Clarified the Drupal Rector setup and its handling of Rector version constraints.
  • Maintenance

    • Updated Drupal Rector tooling.
    • Removed several unused development and production packages.
    • Adjusted automated code-quality checks to avoid incompatible or unnecessary rules.

@coderabbitai

coderabbitai Bot commented Sep 6, 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: Team

Run ID: d589ddf9-3547-4ff5-96fd-764f3883293c

📥 Commits

Reviewing files that changed from the base of the PR and between a6bdaf7 and df4fc3e.

⛔ Files ignored due to path filters (43)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/rector.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json 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/composer.json 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/modules_no_devel_sdc_devel_generated_content_testmode/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json 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_lint/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json 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/composer.json 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/composer.json 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/composer.json 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/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json 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/composer.json 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_rector/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json 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/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (3)
  • .vortex/docs/content/development/composer.mdx
  • composer.json
  • rector.php

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


Walkthrough

The change updates Drupal Rector, removes redundant Composer dependencies, updates dependency documentation, and skips two Rector rules.

Changes

Dependency and Rector configuration

Layer / File(s) Summary
Composer dependency alignment
.vortex/docs/content/development/composer.mdx, composer.json
Drupal Rector is updated to ^1.1.3. Redundant production and development dependencies are removed. The documentation states that Drupal Rector installs and constrains Rector.
Rector rule exclusions
rector.php
AddOverrideAttributeToOverriddenMethodsRector and DisallowedEmptyRuleFixerRector are added to the skipped rules.

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

Merge Risk: ⚪ Minimal · up to df4fc

This updates Drupal Rector dependency handling, removes redundant Composer requirements, and skips two incompatible Rector transformations. No concrete current-head issue remains that blocks merging.

Poem

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

🚥 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 changes: removing redundant Composer requirements and skipping two Rector rules after the version update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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/deps-transitive

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

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.58% (209/212)
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.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

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

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

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

@AlexSkrypnyk

This comment has been minimized.

1 similar comment
@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

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

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.02%. Comparing base (a6bdaf7) to head (df4fc3e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3093      +/-   ##
==========================================
- Coverage   87.37%   87.02%   -0.36%     
==========================================
  Files         107      100       -7     
  Lines        5087     4924     -163     
  Branches       49        3      -46     
==========================================
- Hits         4445     4285     -160     
+ Misses        642      639       -3     

☔ 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.

@AlexSkrypnyk
AlexSkrypnyk enabled auto-merge (squash) September 6, 2026 05:20
@AlexSkrypnyk AlexSkrypnyk added the AUTOMERGE Pull request has been approved and set to automerge label Sep 6, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit ccec814 into main Sep 6, 2026
35 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/deps-transitive branch September 6, 2026 05:21
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AUTOMERGE Pull request has been approved and set to automerge

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant