minor #29093 Clarify deprecation of Email constraint without egulias/email-validator (rpkamp)

This PR was merged into the 4.2-dev branch.

Discussion
----------

Clarify deprecation of Email constraint without egulias/email-validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

f77970b950 Clarify deprecation of Email constraint without egulias/email-validator
This commit is contained in:
Fabien Potencier 2018-11-06 09:13:06 +01:00
commit 5e0d3f0b8d
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);
}
}
}