8000 Unique Entity Assert not calling __toString() method when displaying custom message · Issue #28245 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Unique Entity Assert not calling __toString() method when displaying custom message #28245
Closed
@deivid11

Description

@deivid11

Symfony version(s) affected: 4.1.0

Description
According to the documentation you can use {{ value }} in message option to display a string representation of the invalid entity using the __toString method of the entity class.
I have implemented the __toString method but I'm getting this kind of message "Object of class CLASS identified by "

Possible Solution
I have checked this code but I can't figure out where is the __toString method called. It can be fixed checking if the entity class is implementing __toString before adding the default message.

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