Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] Add arequireTld option toUrl constraint#54408
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
xabbuh commentedMar 27, 2024
we need an entry in the Validator component's changelog file |
javiereguiluz commentedMar 27, 2024
I've added the changelog entry. Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
requireTld option toUrl constraintfabpot commentedApr 5, 2024
Thank you@javiereguiluz. |
| $this->protocols =$protocols ??$this->protocols; | ||
| $this->relativeProtocol =$relativeProtocol ??$this->relativeProtocol; | ||
| $this->normalizer =$normalizer ??$this->normalizer; | ||
| $this->requireTld =$requireTld ??$this->requireTld; |
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 the issue, we discussed deprecating not setting this, so we can change the default totrue (which is in sync with theHostname constraint'srequireTld option).
Do we still want to do this?
If we don't, I would say we change the default of the parameter tofalse instead (I see no point making it nullable?)
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.
see#54588
This implements the last part of#50871 following the suggestions from Wouter and Christian in
#50871 (comment)