Skip to content

fix: preserve Rector and ECS rules across toolchain updates - #402

Open
coisa wants to merge 1 commit into
mainfrom
fix/current-toolchain-compatibility
Open

coisa wants to merge 1 commit into
mainfrom
fix/current-toolchain-compatibility

Conversation

@coisa

@coisa coisa commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Independent prerequisite for #401. Keeps that workflow change, branch protections, and #373 untouched.

Motivation

The native suite in #401 reported the same three errors and one failure under PHP 8.3, 8.4 and 8.5: a removed ECS fixer, two uses of a removed Rector set, and an agent-detector v2 integration test injecting a marker into the wrong environment. A controlled A/B run reproduced the same four failures on main and the #401 tree with the same tool versions.

Changes

  • Use stable Rector sets and keep the legacy sets when their constants are present; Rector moved the active rules into the enabled defaults before removing the deprecated sets. Existing older releases keep effective rules.
  • Register the ten official ECS PHPDoc fixer successors in the standalone preset, without duplicating those already present in Clean Code, and keep the original complete fixer on older supported packages.
  • Call the agent detector's v2 environment API without an ignored argument; test a real marker and the disabled state, restoring both variables.
  • Keep Composer constraints unchanged. No implementation or workflow checks were removed.

Verification

On PHP 8.4 with a common isolated PHPUnit harness:

  • Base and exact fix(ci): wait for required test status metadata #401 source: 23 focused tests each, identical 3 errors + 1 failure.
  • This change with Rector 2.9.2, ECS 13.3.25, agent-detector 2.2.0: 24 tests / 62 assertions.
  • Supported lower edge Rector 2.6.0, ECS 13.0.0, agent-detector 2.0.0: 24 / 43.
  • Transition Rector 2.7.0, ECS 13.3.16, agent-detector 2.2.0: 24 / 62.
  • PHP syntax checks and git diff --check; independently reviewed exact files. Hosted full CI remains the gate; focused verification is not a claim of full Composer/matrix verification.

Documentation

The Rector config documents the distinction between the stable set list and applying the older sets through configure().

Changelog

Added .changelog/current-toolchain-compatibility.md (fixed, patch).

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 943f4815-1d68-40bd-918e-04d3612d16eb
Commits

Reviewing files that changed from the base of the PR and between 105e9f5 and 5134370.

Files selected for processing: 7

  • .changelog/current-toolchain-compatibility.md
  • src/Config/ECSConfig.php
  • src/Config/RectorConfig.php
  • src/Environment/RuntimeEnvironment.php
  • tests/Config/ECSConfigTest.php
  • tests/Config/RectorConfigTest.php
  • tests/Environment/RuntimeEnvironmentTest.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T04:18:11.719471Z 5134370 PR opened
🔒 Security Review ✅ Completed 2026-11-25T04:20:52.983656Z 5134370 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Changelog

✅ Contribution check passed.

Head: 51343702e67d1829fde00179e4909f831191d271

Base: 105e9f5f533f8ebdc902071d1627cbf880d33a0a

Contribution: 1 new valid fragment(s). Policy: ordinary.

  • current-toolchain-compatibility.md — fixed, patch

    Keep the default Rector and ECS rules working with current toolchain releases, and use the agent-detector 2.x process-environment API. Existing supported tool versions retain their legacy lint rules.

@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant