Closed
Description
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:
- Revert [Validator] Remove support of boolean value for the checkDNS option #23391 and don't support specifying DNS record types.
- If we still want to support this feature, define a new option called something like
checkDnsType
Somewhat related to this, Fabien asked whether we should deprecate this checkDNS option entirely. See #23391 (comment)
Metadata
Metadata
Assignees
Labels
RFC = 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)