-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Pre-check constraint validator dependencies #28644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ro0NL
commented
Sep 30, 2018
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | #25865 |
License | MIT |
Doc PR | symfony/symfony-docs#... |
* deprecated using the `Email` constraint without `egulias/email-validator` | ||
* deprecated using the `Expression` constraint without `symfony/expression-language` | ||
* deprecated using the `Language` constraint without `symfony/intl` | ||
* deprecated using the `Locale` constraint without `symfony/intl` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we gather them together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -216,4 +216,6 @@ Validator | |||
* The component is now decoupled from `symfony/translation` and uses `Symfony\Contracts\Translation\TranslatorInterface` instead | |||
* 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` constraint without `symfony/intl` is deprecated | |||
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing final dots here and below (same below for other upgrade files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we only do that for multiple sequences...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think our markdowns are just inconsistent regarding final dots.
Sometimes we add it, sometimes not, mostly aligning with previous entries...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general i think fabbot.io should take care of this yes. I.e. same for indenting, upper-/lowercase first..
if (class_exists(Intl::class)) { | ||
$validCountryCode = isset(Intl::getRegionBundle()->getCountryNames()[substr($canonicalize, 4, 2)]); | ||
} else { | ||
$validCountryCode = ctype_alpha(substr($canonicalize, 4, 2)); | ||
// throw new LogicException('The "symfony/intl" component is required to use the Bic constraint.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should trigger a deprecation here for now (at least when the passed constraint is a subclass of the Bic
constraint).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt we assume they call the parent constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, sounds like a very edge case afterall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, but I think we should still throw the exception in 5.0
Thank you @ro0NL. |
…s (ro0NL) This PR was merged into the 4.2-dev branch. Discussion ---------- [Validator] Pre-check constraint validator dependencies | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | yes | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #25865 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 0544985 [Validator] Pre-check constraint validator dependencies
This PR was merged into the 5.0-dev branch. Discussion ---------- [Validator] Remove fallback dependency checks | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> See #28644 Commits ------- aa84cfd [Validator] Remove fallback dependency checks