Skip to content

Commit a3a200b

Browse files
[Validation] Adding #[\Override] attribute
Page: https://symfony.com/doc/current/validation/custom_constraint.html#creating-the-validator-itself Psalm is complaining about this - don't know if you want to have it in the docs. Targeting 8.0 branch, cause ``#[\Override]` was introduced in PHP 8.3, and all lower Symfony versions allow lower PHP versions.
1 parent e0eabd8 commit a3a200b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

validation/custom_constraint.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ The validator class only has one required method ``validate()``::
133133

134134
class ContainsAlphanumericValidator extends ConstraintValidator
135135
{
136+
#[\Override]
136137
public function validate(mixed $value, Constraint $constraint): void
137138
{
138139
if (!$constraint instanceof ContainsAlphanumeric) {

0 commit comments

Comments
 (0)