Skip to content
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

[Validator] Add a requireTld option to Url constraint #54408

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

javiereguiluz
Copy link
Member

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Issues #50871
License MIT

This implements the last part of #50871 following the suggestions from Wouter and Christian in
#50871 (comment)

@xabbuh
Copy link
Member

xabbuh commented Mar 27, 2024

we need an entry in the Validator component's changelog file

@javiereguiluz
Copy link
Member Author

I've added the changelog entry. Thanks!

@javiereguiluz javiereguiluz added the ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" label Apr 2, 2024
@OskarStark OskarStark changed the title [Validator] Add a requireTld option to Url constraint [Validator] Add a requireTld option to Url constraint Apr 2, 2024
@fabpot
Copy link
Member

fabpot commented Apr 5, 2024

Thank you @javiereguiluz.

@fabpot fabpot merged commit 1c660fa into symfony:7.1 Apr 5, 2024
8 of 10 checks passed
@javiereguiluz javiereguiluz deleted the finish_50871 branch April 5, 2024 07:29
) {
parent::__construct($options, $groups, $payload);

$this->message = $message ?? $this->message;
$this->protocols = $protocols ?? $this->protocols;
$this->relativeProtocol = $relativeProtocol ?? $this->relativeProtocol;
$this->normalizer = $normalizer ?? $this->normalizer;
$this->requireTld = $requireTld ?? $this->requireTld;
Copy link
Member

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 to true (which is in sync with the Hostname constraint's requireTld option).

Do we still want to do this?

If we don't, I would say we change the default of the parameter to false instead (I see no point making it nullable?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #54588

@fabpot fabpot mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" Status: Reviewed Validator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants