Skip to content

Commit 1817356

Browse files
[FrameworkBundle][Validator] Remove remaining deprecations
1 parent c7c1070 commit 1817356

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ CHANGELOG
2222
* Make the `framework.uid.default_uuid_version` config option default to `7`
2323
* Make the `framework.uid.time_based_uuid_version` config option default to `7`
2424
* Make the `framework.validation.email_validation_mode` config option default to `html5`
25+
* Remove the `framework.validation.enable_annotations` config option, use `framework.validation.enable_attributes` instead
26+
* Remove the `framework.serializer.enable_annotations` config option, use `framework.serializer.enable_attributes` instead
2527

2628
6.4
2729
---

DependencyInjection/Configuration.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
989989
->{$enableIfStandalone('symfony/validator', Validation::class)}()
990990
->children()
991991
->scalarNode('cache')->end()
992-
->booleanNode('enable_annotations')->end()
993992
->booleanNode('enable_attributes')->{!class_exists(FullStack::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
994993
->arrayNode('static_method')
995994
->defaultValue(['loadValidatorMetadata'])
@@ -1090,24 +1089,9 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e
10901089
$rootNode
10911090
->children()
10921091
->arrayNode('serializer')
1093-
->validate()
1094-
->always(function ($v) {
1095-
if (isset($v['enable_annotations'])) {
1096-
trigger_deprecation('symfony/framework-bundle', '6.4', 'Option "enable_annotations" at "framework.serializer" is deprecated. Use the "enable_attributes" option instead.');
1097-
1098-
if (!isset($v['enable_attributes'])) {
1099-
$v['enable_attributes'] = $v['enable_annotations'];
1100-
} else {
1101-
throw new LogicException('The "enable_annotations" and "enable_attributes" options at path "framework.serializer" must not be both set. Only the "enable_attributes" option must be used.');
1102-
}
1103-
}
1104-
1105-
return $v;
1106-
})->end()
11071092
->info('serializer configuration')
11081093
->{$enableIfStandalone('symfony/serializer', Serializer::class)}()
11091094
->children()
1110-
->booleanNode('enable_annotations')->end()
11111095
->booleanNode('enable_attributes')->{!class_exists(FullStack::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
11121096
->scalarNode('name_converter')->end()
11131097
->scalarNode('circular_reference_handler')->end()

Resources/config/schema/symfony-1.0.xsd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@
266266

267267
<xsd:attribute name="enabled" type="xsd:boolean" />
268268
<xsd:attribute name="cache" type="xsd:string" />
269-
<xsd:attribute name="enable-annotations" type="xsd:boolean" />
270269
<xsd:attribute name="enable-attributes" type="xsd:boolean" />
271270
<xsd:attribute name="static-method" type="xsd:boolean" />
272271
<xsd:attribute name="translation-domain" type="xsd:string" />
@@ -320,7 +319,6 @@
320319
<xsd:element name="default-context" type="metadata" minOccurs="0" maxOccurs="1" />
321320
</xsd:choice>
322321
<xsd:attribute name="enabled" type="xsd:boolean" />
323-
<xsd:attribute name="enable-annotations" type="xsd:boolean" />
324322
<xsd:attribute name="enable-attributes" type="xsd:boolean" />
325323
<xsd:attribute name="name-converter" type="xsd:string" />
326324
<xsd:attribute name="circular-reference-handler" type="xsd:string" />

0 commit comments

Comments
 (0)