File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ class UniqueEntity extends Constraint
26
26
{
27
27
public const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f ' ;
28
28
29
+ protected const ERROR_NAMES = [
30
+ self ::NOT_UNIQUE_ERROR => 'NOT_UNIQUE_ERROR ' ,
31
+ ];
32
+
29
33
public $ message = 'This value is already used. ' ;
30
34
public $ service = 'doctrine.orm.validator.unique ' ;
31
35
public $ em = null ;
@@ -35,9 +39,10 @@ class UniqueEntity extends Constraint
35
39
public $ errorPath = null ;
36
40
public $ ignoreNull = true ;
37
41
38
- protected static $ errorNames = [
39
- self ::NOT_UNIQUE_ERROR => 'NOT_UNIQUE_ERROR ' ,
40
- ];
42
+ /**
43
+ * @deprecated since Symfony 6.1, use const ERROR_NAMES instead
44
+ */
45
+ protected static $ errorNames = self ::ERROR_NAMES ;
41
46
42
47
/**
43
48
* {@inheritdoc}
You can’t perform that action at this time.
0 commit comments