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
2626{
2727 public const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f ' ;
2828
29+ protected const ERROR_NAMES = [
30+ self ::NOT_UNIQUE_ERROR => 'NOT_UNIQUE_ERROR ' ,
31+ ];
32+
2933 public $ message = 'This value is already used. ' ;
3034 public $ service = 'doctrine.orm.validator.unique ' ;
3135 public $ em = null ;
@@ -35,9 +39,10 @@ class UniqueEntity extends Constraint
3539 public $ errorPath = null ;
3640 public $ ignoreNull = true ;
3741
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 ;
4146
4247 /**
4348 * {@inheritdoc}
You can’t perform that action at this time.
0 commit comments