Skip to content

[Validator] Dumper and Table conflicting in console rendering #46007

Closed
@MarionLeHerisson

Description

@MarionLeHerisson

Symfony version(s) affected

6.0.*

Description

When using the command php bin/console debug:validator 'App\Entity\Foo', I noticed that the Table rendering is all wrong. After digging a bit, I thought this bug happened when using the Dumper inside a Table in the console output, but when I tried to reproduce it, everything went well.

Here is a screenshot of the output of the debug:validator command :
image

As you can see, the colour codes are mistaken for actual string and cut in the middle.

When I try to reproduce in a custom console command (inside the same Symfony project), everything works fine :
image

How to reproduce

Create an Entity with a constraint :

namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

class Foo
{
    #[Assert\NotBlank]
    private string $bar;
}

run php bin/console debug:validator 'App\Entity\Foo'

Possible Solution

No response

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