Skip to content

[Configs] Add EnableValidationAttributesRector - #1004

Merged
TomasVotruba merged 1 commit into
mainfrom
enable-validation-attributes-rule
Aug 3, 2026
Merged

[Configs] Add EnableValidationAttributesRector#1004
TomasVotruba merged 1 commit into
mainfrom
enable-validation-attributes-rule

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Adds EnableValidationAttributesRector to the configs set.

When validation metadata is moved from loadValidatorMetadata() to attributes (see LoadValidatorMetadataToAttributeRector), the framework config must load them. This rule flips the config value:

 $container->loadFromExtension('framework', [
     'secret' => '%secret_key%',
     'validation' => [
-        'enable_attributes' => false,
+        'enable_attributes' => true,
     ],
 ]);

Scope:

  • matches $container->loadFromExtension('framework', [...]) array config only
  • only flips an existing false value, does not add a missing key

@TomasVotruba
TomasVotruba merged commit 2f7df70 into main Aug 3, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the enable-validation-attributes-rule branch August 3, 2026 22:42
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