@@ -83,52 +83,6 @@ configure the locations of these files::
83
83
:method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::addXmlMappings `
84
84
to configure an array of file paths.
85
85
86
- The AnnotationLoader
87
- --------------------
88
-
89
- .. deprecated :: 6.4
90
-
91
- The :class: `Symfony\\ Component\\ Validator\\ Mapping\\ Loader\\ AnnotationLoader `
92
- is deprecated since Symfony 6.4, use the
93
- :class: `Symfony\\ Component\\ Validator\\ Mapping\\ Loader\\ AttributeLoader `
94
- instead.
95
-
96
- The component provides an
97
- :class: `Symfony\\ Component\\ Validator\\ Mapping\\ Loader\\ AnnotationLoader ` to get
98
- the metadata from the attributes of the class::
99
-
100
- use Symfony\Component\Validator\Constraints as Assert;
101
- // ...
102
-
103
- class User
104
- {
105
- #[Assert\NotBlank]
106
- protected string $name;
107
- }
108
-
109
- To enable the annotation loader, call the
110
- :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::enableAnnotationMapping ` method::
111
-
112
- use Symfony\Component\Validator\Validation;
113
-
114
- $validator = Validation::createValidatorBuilder()
115
- ->enableAnnotationMapping()
116
- ->getValidator();
117
-
118
- To disable the annotation loader after it was enabled, call
119
- :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::disableAnnotationMapping `.
120
-
121
- .. deprecated :: 6.4
122
-
123
- The :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::enableAnnotationMapping `
124
- and :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::disableAnnotationMapping `
125
- methods are deprecated since Symfony 6.4, use the
126
- :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::enableAttributeMapping `
127
- and :method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::disableAttributeMapping `
128
- methods instead.
129
-
130
- .. include :: /_includes/_annotation_loader_tip.rst.inc
131
-
132
86
The AttributeLoader
133
87
-------------------
134
88
0 commit comments