Move EnableValidationAttributesRector into composer-based upgrade path - #1065
Merged
Merged
Conversation
Bind the rule to symfony/framework-bundle >=6.4, the version that introduced the framework.validation.enable_attributes config key (replacing enable_annotations, removed in 7.0). Registered in the version-bound composer-based set instead of the flat configs set. Claude-Session: https://claude.ai/code/session_01WD78HWwUoj2bSAppDbaNa1
TomasVotruba
deleted the
enable-validation-attributes-composer-bound
branch
September 11, 2026 18:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bind
EnableValidationAttributesRectortosymfony/framework-bundle >=6.4and register it in the version-boundcomposer-based.phpset, instead of the flatconfigs.phpset.Why 6.4?
The rule flips
framework.validation.enable_attributesfromfalsetotrue. That config key was introduced in framework-bundle 6.4, replacingenable_annotations(deprecated in 6.4, removed in 7.0). Binding earlier would be wrong - pre-6.4 config usesenable_annotations, so the key the rule targets does not exist yet.Changes
ComposerPackageConstraintInterface->symfony/framework-bundle >=6.4config/sets/symfony/composer-based.phpunder aframework-bundle 6.4commentconfig/sets/symfony/configs.phpprovideComposerJsonFilePath()with aconfig/composer.jsonpinningsymfony/framework-bundle ^6.4, matching how other framework-bundle-bonded rules test against a package not in require-devhttps://claude.ai/code/session_01WD78HWwUoj2bSAppDbaNa1