Skip to content

Move EnableValidationAttributesRector into composer-based upgrade path - #1065

Merged
TomasVotruba merged 2 commits into
mainfrom
enable-validation-attributes-composer-bound
Sep 11, 2026
Merged

Move EnableValidationAttributesRector into composer-based upgrade path#1065
TomasVotruba merged 2 commits into
mainfrom
enable-validation-attributes-composer-bound

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Bind EnableValidationAttributesRector to symfony/framework-bundle >=6.4 and register it in the version-bound composer-based.php set, instead of the flat configs.php set.

Why 6.4?

The rule flips framework.validation.enable_attributes from false to true. That config key was introduced in framework-bundle 6.4, replacing enable_annotations (deprecated in 6.4, removed in 7.0). Binding earlier would be wrong - pre-6.4 config uses enable_annotations, so the key the rule targets does not exist yet.

Changes

  • rule now implements ComposerPackageConstraintInterface -> symfony/framework-bundle >=6.4
  • registered in config/sets/symfony/composer-based.php under a framework-bundle 6.4 comment
  • removed from config/sets/symfony/configs.php
  • test overrides provideComposerJsonFilePath() with a config/composer.json pinning symfony/framework-bundle ^6.4, matching how other framework-bundle-bonded rules test against a package not in require-dev

https://claude.ai/code/session_01WD78HWwUoj2bSAppDbaNa1

TomasVotruba and others added 2 commits September 11, 2026 20:47
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
TomasVotruba merged commit 4babdb9 into main Sep 11, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the enable-validation-attributes-composer-bound branch September 11, 2026 18: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.

2 participants