Skip to content

Commit 0f33e0e

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Translation] Fix Crowdin documentation urls ignore missing keys when mapping DateTime objects to uninitialized arrays fix writes to static $kernel property [Notifier] Fix test logic [Validator] Hint that `egulias/email-validator` needs to be installed for strict mode as default config
2 parents 24e0bf8 + 2f717ce commit 0f33e0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Constraints/EmailValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public function validate(mixed $value, Constraint $constraint)
7474
}
7575

7676
if (null === $constraint->mode) {
77+
if (Email::VALIDATION_MODE_STRICT === $this->defaultMode && !class_exists(EguliasEmailValidator::class)) {
78+
throw new LogicException(sprintf('The "egulias/email-validator" component is required to make the "%s" constraint default to strict mode.', EguliasEmailValidator::class));
79+
}
80+
7781
$constraint->mode = $this->defaultMode;
7882
}
7983

0 commit comments

Comments
 (0)