ConstraintUrlOptionRector

Turns true value to Url::CHECK_DNS_TYPE_ANY in Validator in Symfony.

-$constraint = new Url(["checkDNS" => true]);
+$constraint = new Url(["checkDNS" => Url::CHECK_DNS_TYPE_ANY]);

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony40\Rector\ConstFetch\ConstraintUrlOptionRector;

return RectorConfig::configure()
    ->withRules([
        ConstraintUrlOptionRector::class,
    ]);
SETS:  symfony/* 4.0