From a3a200b0f7529bd9693594b8207cb3db6cac2f73 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 18 Dec 2025 17:46:19 +0100 Subject: [PATCH] [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. --- validation/custom_constraint.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/validation/custom_constraint.rst b/validation/custom_constraint.rst index 656cc6e1922..f50b2326c6e 100644 --- a/validation/custom_constraint.rst +++ b/validation/custom_constraint.rst @@ -133,6 +133,7 @@ The validator class only has one required method ``validate()``:: class ContainsAlphanumericValidator extends ConstraintValidator { + #[\Override] public function validate(mixed $value, Constraint $constraint): void { if (!$constraint instanceof ContainsAlphanumeric) {