Skip to content

Cap legacy removed-API rules at upper version bound - #1076

Merged
TomasVotruba merged 3 commits into
mainfrom
cap-legacy-removed-api-rules
Oct 11, 2026
Merged

TomasVotruba merged 3 commits into
mainfrom
cap-legacy-removed-api-rules

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Follow-up to #1075. Several version-bound rules migrate off a Symfony API that was hard-removed in a known major. Past removal + 2 majors the legacy source can no longer exist in runnable code, so keeping these rules active on every file is just cost with no value.

Adds an upper bound to each, using removal major + 2 (same shape as #1075):

Rule constraint
GetRequestRector symfony/framework-bundle >=2.5 <5.0
FormTypeGetParentRector symfony/form >=3.0 <5.0
StringFormTypeToClassRector symfony/form >=3.0 <5.0
OptionNameRector symfony/form >=3.0 <5.0
ChangeStringCollectionOptionToConstantRector symfony/form >=3.0 <5.0
FormTypeInstanceToClassConstRector symfony/framework-bundle >=3.0 <5.0
ParseFileRector symfony/yaml >=2.8 <5.0
ConsoleExceptionToErrorEventConstantRector symfony/console >=3.3 <6.0

Removal majors: form type strings/instances and Yaml filename parsing removed in 3.0; ConsoleExceptionEvent / ConsoleEvents::EXCEPTION removed in 4.0.

Each rule already has a test composer.json stub pinning the package inside the capped range, so the rules stay active under test - no test changes needed.

Modernization rules (annotation/interface to attribute, type declarations, named args) are intentionally left uncapped - their target is current best practice and keeps bringing value on latest.

@TomasVotruba
TomasVotruba merged commit 0b21c8a into main Oct 11, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the cap-legacy-removed-api-rules branch October 11, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant