Skip to content

Commit 69788ab

Browse files
committed
Deprecated the checkDNS and dnsMessage options
1 parent e49526e commit 69788ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

reference/constraints/Url.rst

+12
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ checkDNS
231231

232232
**type**: ``boolean`` **default**: ``false``
233233

234+
.. versionadded:: 4.1
235+
This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0,
236+
because checking the DNS records is not reliable enough to validate the
237+
existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you
238+
still want to use this kind of validation.
239+
234240
By default, this constraint just validates the syntax of the given URL. If you
235241
also need to check whether the associated host exists, set the ``checkDNS``
236242
option to ``true``:
@@ -305,6 +311,12 @@ dnsMessage
305311

306312
**type**: ``string`` **default**: ``The host could not be resolved.``
307313

314+
.. versionadded:: 4.1
315+
This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0,
316+
because checking the DNS records is not reliable enough to validate the
317+
existence of the host. Use the :phpfunction:`checkdnsrr` PHP function if you
318+
still want to use this kind of validation.
319+
308320
This message is shown when the ``checkDNS`` option is set to ``true`` and the
309321
DNS check failed.
310322

0 commit comments

Comments
 (0)