File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ class Mig extends Constraint
24
24
public $ migMessage = 'Cette valeur n \'est pas au format MIG. ' ;
25
25
26
26
/** @var array<string, string> */
27
- protected static $ errorNames = [
27
+ protected const ERROR_NAMES = [
28
28
self ::LENGTH_ERROR => 'LENGTH_ERROR ' ,
29
29
self ::MIG_INVALID => 'MIG_INVALID ' ,
30
30
];
31
+
32
+ /**
33
+ * @var array<string, string>
34
+ * @deprecated since Symfony 6.1, use const ERROR_NAMES instead
35
+ */
36
+ protected static $ errorNames = self ::ERROR_NAMES ;
31
37
}
Original file line number Diff line number Diff line change @@ -33,12 +33,18 @@ class Nir extends Constraint
33
33
public $ nirKeyMessage = 'La clé ne correspond pas au NIR fourni. ' ;
34
34
35
35
/** @var array<string, string> */
36
- protected static $ errorNames = [
36
+ protected const ERROR_NAMES = [
37
37
self ::LENGTH_ERROR => 'LENGTH_ERROR ' ,
38
38
self ::NIR_INVALID => 'NIR_INVALID ' ,
39
39
self ::NIR_KEY_INVALID => 'NIR_KEY_INVALID ' ,
40
40
];
41
41
42
+ /**
43
+ * @var array<string, string>
44
+ * @deprecated since Symfony 6.1, use const ERROR_NAMES instead
45
+ */
46
+ protected static $ errorNames = self ::ERROR_NAMES ;
47
+
42
48
/** @var NirKeyInterface */
43
49
public $ nirKey ;
44
50
Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ class Nnp extends Constraint
24
24
public $ nnpMessage = 'Cette valeur n \'est pas au format NNP. ' ;
25
25
26
26
/** @var array<string, string> */
27
- protected static $ errorNames = [
27
+ protected const ERROR_NAMES = [
28
28
self ::LENGTH_ERROR => 'LENGTH_ERROR ' ,
29
29
self ::NNP_INVALID => 'NNP_INVALID ' ,
30
30
];
31
+
32
+ /**
33
+ * @var array<string, string>
34
+ * @deprecated since Symfony 6.1, use const ERROR_NAMES instead
35
+ */
36
+ protected static $ errorNames = self ::ERROR_NAMES ;
31
37
}
You can’t perform that action at this time.
0 commit comments