8000 minor #19147 [Validator] explicitly forbid e-mail validator 2.0 or hi… · symfony/symfony@989f821 · GitHub
[go: up one dir, main page]

Skip to content

Commit 989f821

Browse files
committed
minor #19147 [Validator] explicitly 8000 forbid e-mail validator 2.0 or higher (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [Validator] explicitly forbid e-mail validator 2.0 or higher | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 81a6d8e explicitly forbid e-mail validator 2.0 or higher
2 parents e8901b1 + 81a6d8e commit 989f821

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/Constraints/EmailValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public function validate($value, Constraint $constraint)
5656
}
5757

5858
if ($constraint->strict) {
59-
if (!class_exists('\Egulias\EmailValidator\EmailValidator')) {
60-
throw new RuntimeException('Strict email validation requires egulias/email-validator');
59+
if (!class_exists('\Egulias\EmailValidator\EmailValidator') || interface_exists('\Egulias\EmailValidator\Validation\EmailValidation')) {
60+
throw new RuntimeException('Strict email validation requires egulias/email-validator:~1.2');
6161
}
6262

6363
$strictValidator = new \Egulias\EmailValidator\EmailValidator();

0 commit comments

Comments
 (0)
0