Skip to content

Expression constraint bug with symfony/validator #49901

@Hugo-Le-Goff

Description

@Hugo-Le-Goff

Symfony version(s) affected

6.2.8

Description

Since I upgraded my project to 6.2.8 I'm having this issue when validating forms of objects which contain an Expression assert. Meaning I can generate the form on a page but when posting it the validation is throwing this error.

Constraint validator "validator.expression" does not exist or is not enabled. Check the "validatedBy" method in your constraint class "Symfony\Component\Validator\Constraints\Expression".

I tried downgrading symfony/validator to 6.2.7 but the bug persists. But it works when I downgraded every dependencies to 6.2.7 (I replaced every 6.2.* by 6.2.7). If you want to see my dependencies : https://textup.fr/

I don't know if it's only relative to my project or to symfony globally, but it's happening with multiple entities containing an Expression assert on my project and which were working perfectly before.

Thank you for your time.

How to reproduce

I'm really sorry but I'm a medicine student not a full time developper. I don't have time to make a bug reproducer at the moment.

I guess creating a simple object with an Expression assert and a Form of this object should reproduce the error.

If the bug is not that simple to reproduce, then I can take some time to make a reproducer.

Possible Solution

No response

Additional Context

When running composer update I also got this dependency downgraded
Downgrading phpdocumentor/type-resolver (1.7.1 => 1.6.2): Extracting archive

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