File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed
src/Symfony/Component/Validator/Constraints Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change 14
14
use Symfony \Component \Validator \Constraint ;
15
15
use Symfony \Component \Validator \Exception \InvalidArgumentException ;
16
16
17
- /**
18
- * @Annotation
19
- * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
20
- *
21
- * @author symfonyaml
22
- */
23
17
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE )]
24
18
class Yaml extends Constraint
25
19
{
@@ -29,11 +23,6 @@ class Yaml extends Constraint
29
23
self ::INVALID_YAML_ERROR => 'INVALID_YAML_ERROR ' ,
30
24
];
31
25
32
- /**
33
- * @deprecated since Symfony 6.1, use const ERROR_NAMES instead
34
- */
35
- protected static $ errorNames = self ::ERROR_NAMES ;
36
-
37
26
public $ message = 'This value should be valid YAML. ' ;
38
27
public $ flags = 0 ;
39
28
Original file line number Diff line number Diff line change 23
23
*/
24
24
class YamlValidator extends ConstraintValidator
25
25
{
26
- /**
27
- * @return void
28
- */
29
- public function validate (mixed $ value , Constraint $ constraint )
26
+ public function validate (mixed $ value , Constraint $ constraint ): void
30
27
{
31
28
if (!$ constraint instanceof Yaml) {
32
29
throw new UnexpectedTypeException ($ constraint , Yaml::class);
You can’t perform that action at this time.
0 commit comments