8000 symfony/validation 4.4.31 -> 4.4.33 - Broke validation for URL without TLD · Issue #44252 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
symfony/validation 4.4.31 -> 4.4.33 - Broke validation for URL without TLD #44252
Closed
@sazo

Description

@sazo

Symfony version(s) affected

4.4.33

Description

URL validation changed between symfony/validation:4.4.31 and symfony/validation:4.4.33. (4.4.32 does not exists)

http://vat-rates/graphql/internal (Works with 4.4.31)
http://vat-rates/graphql/internal (Rejected with 4.4.33)

Seems like its the changes in #43388 that broke it.

How to reproduce

<?php

declare(strict_types=1);

require_once __DIR__.'/vendor/autoload.php';

use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Validation;

$wrongUrl = 'http://vat-rates/graphql/internal';
$urlValidator = Validation::createValidator();
$urlConstraint = new Constraints\Url();

var_dump($urlValidator->validate($wrongUrl, $urlConstraint)->count());

Outputs

4.4.31
php test.php                  
int(0)

4.4.33
php test.php
int(1)

Possible Solution

Revert of #43388? maybe :)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0