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

Appearance settings

[RFC] Revert the removal of boolean values in checkDNS option #23538

Copy link
Copy link
Closed
@javiereguiluz

Description

@javiereguiluz
Issue body actions
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? yes
Symfony version 3.4

Traditionally, we used checkDNS like this:

AppBundle\Entity\Author:
    properties:
        bioUrl:
            - Url: { checkDNS: true }

After #23391, you must use it like this:

AppBundle\Entity\Author:
    properties:
        bioUrl:
            - Url: { checkDNS: !php/const:Symfony\Component\Validator\Constraints\Url::CHECK_DNS_TYPE_ANY }

Or use a "magic string" to define the expected non-boolean value:

AppBundle\Entity\Author:
    properties:
        bioUrl:
            - Url: { checkDNS: 'ANY' }

To me this change is a step backwards DX-wise. Why?

  • It's worse for the common case where you don't care about the DNS record type.
  • It's OK for the advanced case where you specify the DNS record type.
  • It doesn't work for the more advanced case where you want to allow more than one DNS record type.

My proposal:


Somewhat related to this, Fabien asked whether we should deprecate this checkDNS option entirely. See #23391 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)Validator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.