Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Deprecated "checkDNS" option in Url constraint#25516

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

Closed
ro0NL wants to merge4 commits intosymfony:masterfromro0NL:checkdnsrr
Closed

[Validator] Deprecated "checkDNS" option in Url constraint#25516

ro0NL wants to merge4 commits intosymfony:masterfromro0NL:checkdnsrr

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedDec 15, 2017
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#23538
LicenseMIT
Doc PRsymfony/symfony-docs#8921

thrownewInvalidOptionsException(sprintf('Invalid value for option "checkDNS" in constraint %s',get_class($constraint)),array('checkDNS'));
}

@trigger_error(sprintf('The "checkDNS" option in "%s" is deprecated since 4.1 and will be removed in 5.0.', Url::class),E_USER_DEPRECATED);
Copy link
Member

@nicolas-grekasnicolas-grekasDec 18, 2017
edited
Loading

Choose a reason for hiding this comment

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

sinceversion 4.1
I'm wondering: should we add a few words why? like eg
The "checkDNS" option in "%s" is deprecated since 4.1 and will be removed in 5.0. It's too fragile to be relied upon.

Choose a reason for hiding this comment

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

the notice should be before the above "if", isn't it?

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is too fragile, but the false positive rate is so high that it's not reliable. I think reliable is perhaps better.

nicolas-grekas reacted with thumbs up emoji
}

if ($constraint->checkDNS) {
@trigger_error(sprintf('The "checkDNS" option in "%s" is deprecated since version 4.1 and will be removed in 5.0. Its false positive rate is too high to be relied upon.', Url::class),E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

I would just suggest a dash: false-positive


* The`Email::__construct()` 'strict' property is deprecated and will be removed in 5.0. Use 'mode'=>"strict" instead.
* Calling`EmailValidator::__construct()` method with a boolean parameter is deprecated and will be removed in 5.0, use`EmailValidator("strict")` instead.
* Deprecated`checkDNS` option in`Url` constraint. It will be removed in 5.0.
Copy link
Member

@xabbuhxabbuhDec 22, 2017
edited
Loading

Choose a reason for hiding this comment

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

Deprecated thecheckDNS option in theUrl [...]

* The`Email::__construct()` 'strict' property has been removed. Use 'mode'=>"strict" instead.
* Calling`EmailValidator::__construct()` method with a boolean parameter has been removed, use`EmailValidator("strict")` instead.

* Removed`checkDNS` option in`Url` constraint.
Copy link
Member

Choose a reason for hiding this comment

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

Removed thecheckDNS option from theUrl constraint.

4.1.0
-----

* Deprecated`checkDNS` option in`Url` constraint. It will be removed in 5.0.
Copy link
Member

Choose a reason for hiding this comment

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

Deprecated thecheckDNS option in theUrl [...]

class Urlextends Constraint
{
/**
* @deprecated since version 4.1, to be removed in 5.0
Copy link
Member

Choose a reason for hiding this comment

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

since Symfony 4.1 (see#25565)

@ro0NL
Copy link
ContributorAuthor

Forgot to deprecate$dnsMessage option. Now updated. Should it be mentioned explicitly? In general it's only enabled thru$checkDNS so fine to me as is.

@xabbuh
Copy link
Member

As people may forgot to not use thednsMessage option when droppingcheckDNS it might be good to deprecate it explicitly too.

@ro0NL
Copy link
ContributorAuthor

Deprecation now moved to constraint constructor.


* The`Email::__construct()` 'strict' property is deprecated and will be removed in 5.0. Use 'mode'=>"strict" instead.
* Calling`EmailValidator::__construct()` method with a boolean parameter is deprecated and will be removed in 5.0, use`EmailValidator("strict")` instead.
* Deprecated the`checkDNS` and`dnsMessage` options in the`Url` constraint. They will be removed in 5.0.
Copy link
Member

Choose a reason for hiding this comment

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

[...] options of the [...]

* The`Email::__construct()` 'strict' property has been removed. Use 'mode'=>"strict" instead.
* Calling`EmailValidator::__construct()` method with a boolean parameter has been removed, use`EmailValidator("strict")` instead.

* Removed the`checkDNS` and`dnsMessage` options in the`Url` constraint.
Copy link
Member

Choose a reason for hiding this comment

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

[...] options from the [...]

4.1.0
-----

* Deprecated the`checkDNS` and`dnsMessage` options in the`Url` constraint. They will be removed in 5.0.
Copy link
Member

Choose a reason for hiding this comment

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

[...] options of the [...]

@fabpot
Copy link
Member

Thank you@ro0NL.

@fabpotfabpot mentioned this pull requestMay 7, 2018
@iisisrael
Copy link

I'm actually sad to see this go. Adding the functionality back into our project as a customized extension was not difficult, but I think it odd that there was so little discussion around the deprecation. If the underlying functionality is deemed inconclusive because of false positives, that's something that should be understood by the consuming application. We know that, and use this functionality as just one piece of a greater validation strategy. Having it as an option was just that, an option.

@iisisrael
Copy link

iisisrael commentedAug 17, 2018
edited
Loading

Also, the same functionality continues to exist undeprecated as thecheckHost andcheckMX options in theEmailValidator.

nicolas-grekas added a commit that referenced this pull requestMay 29, 2019
This PR was merged into the 5.0-dev branch.Discussion----------[Validator] Remove checkDNS option in Url| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no     <!-- seehttps://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#25516Commits-------885703f [Validator] Remove checkDNS option in Url
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

6 participants

@ro0NL@xabbuh@fabpot@iisisrael@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp