Skip to content

Symfony Form component - not possible to use class with magic get method #7485

@Serge-SDL

Description

@Serge-SDL

when you create a form by doing :
createForm(new foo(), $object);
with a "bar" form field defined in your foo FormType, the Symfony Form component is looking if one of the method getBar() , isBar() or hasBar() exists. If neither of this methods exists, an exception is thrown. This is a problem for object that use magical methods to simulate getBar() method for exemple.

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