Skip to content

Commit 8e41a2d

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Validator] Fix Email validator logic Fix user_identifier support after username has been deprecated in favor of it. [PropertyInfo] Fixes constructor extractor for mixed type use method_exists() instead of catching reflection exceptions
2 parents 6796956 + 9858255 commit 8e41a2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Constraints/EmailValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
1717
use Symfony\Component\Validator\Constraint;
1818
use Symfony\Component\Validator\ConstraintValidator;
19+
use Symfony\Component\Validator\Exception\LogicException;
1920
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
2021
use Symfony\Component\Validator\Exception\UnexpectedValueException;
2122

@@ -71,7 +72,7 @@ public function validate(mixed $value, Constraint $constraint)
7172

7273
if (null === $constraint->mode) {
7374
if (Email::VALIDATION_MODE_STRICT === $this->defaultMode && !class_exists(EguliasEmailValidator::class)) {
74-
throw new LogicException(sprintf('The "egulias/email-validator" component is required to make the "%s" constraint default to strict mode.', EguliasEmailValidator::class));
75+
throw new LogicException(sprintf('The "egulias/email-validator" component is required to make the "%s" constraint default to strict mode.', Email::class));
7576
}
7677

7778
$constraint->mode = $this->defaultMode;

0 commit comments

Comments
 (0)