Clarify deprecation of Email constraint without egulias/email-validator

This commit is contained in:
Remon van de Kamp 2018-11-05 09:55:46 +01:00
parent 4bc1cc7e43
commit f77970b950
No known key found for this signature in database
GPG Key ID: DB4A5E50852390A3
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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);
}
}
}