Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Validator] AbstractComparison cannot recognize an array due to deprecation check #62358

@emodric

Description

@emodric

Symfony version(s) affected

7.3

Description

When using AbstractComparison constraint to compare a value to an array, e.g.

new Assert\NotIdenticalTo(value: []),

The deprecation is still emmited because the code checks if the value is an array or not.

How to reproduce

Just use a constraint extending from AbstractComparison class and check for an array value:

new Assert\NotIdenticalTo(value: []),

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