Clarify deprecation of Email constraint without egulias/email-validator
This commit is contained in:
parent
4bc1cc7e43
commit
f77970b950
@ -360,7 +360,7 @@ Validator
|
||||
* The `ValidatorBuilderInterface` has been deprecated and `ValidatorBuilder` made final
|
||||
* Deprecated validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`. Use `Type` instead or remove the constraint if the underlying model is type hinted to `\DateTimeInterface` already.
|
||||
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated
|
||||
* Using the `Email` constraint without `egulias/email-validator` is deprecated
|
||||
* Using the `Email` constraint in strict mode without `egulias/email-validator` is deprecated
|
||||
* Using the `Expression` constraint without `symfony/expression-language` is deprecated
|
||||
|
||||
WebServerBundle
|
||||
|
@ -276,7 +276,7 @@ Validator
|
||||
* The `ValidatorBuilderInterface` has been removed and `ValidatorBuilder` is now final
|
||||
* Removed support for validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`. Use `Type` instead or remove the constraint if the underlying model is type hinted to `\DateTimeInterface` already.
|
||||
* The `symfony/intl` component is now required for using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints
|
||||
* The `egulias/email-validator` component is now required for using the `Email` constraint
|
||||
* The `egulias/email-validator` component is now required for using the `Email` constraint in strict mode
|
||||
* The `symfony/expression-language` component is now required for using the `Expression` constraint
|
||||
|
||||
Workflow
|
||||
|
@ -95,8 +95,8 @@ class Email extends Constraint
|
||||
parent::__construct($options);
|
||||
|
||||
if ((self::VALIDATION_MODE_STRICT === $this->mode || true === $this->strict) && !class_exists(StrictEmailValidator::class)) {
|
||||
// throw new LogicException(sprintf('The "egulias/email-validator" component is required to use the "%s" constraint.', __CLASS__));
|
||||
@trigger_error(sprintf('Using the "%s" constraint without the "egulias/email-validator" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
|
||||
// throw new LogicException(sprintf('The "egulias/email-validator" component is required to use the "%s" constraint in strict mode.', __CLASS__));
|
||||
@trigger_error(sprintf('Using the "%s" constraint in strict mode without the "egulias/email-validator" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user