Skip to content

Commit ac9c573

Browse files
[Validator] Deprecate Constraint::$errorNames in favor of Constraint::ERROR_NAMES
1 parent 02c43d1 commit ac9c573

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Extension/Validator/Constraints/Form.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ class Form extends Constraint
2121
public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
2222
public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
2323

24-
protected static $errorNames = [
24+
protected const ERROR_NAMES = [
2525
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',
2626
self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR',
2727
];
2828

29+
/**
30+
* @deprecated since Symfony 6.1, use const ERROR_NAMES instead
31+
*/
32+
protected static $errorNames = self::ERROR_NAMES;
33+
2934
/**
3035
* {@inheritdoc}
3136
*/

0 commit comments

Comments
 (0)