Skip to content

[Form] DoctrineOrmTypeGuesser causes error for DecimalType #31905

@ricohumme

Description

@ricohumme

Symfony version(s) affected: 4.3.0

Description
The TypeGuesser (DoctrineOrmTypeGuesser) sets the option input to string which causes the StringToFloatTransformer to take effect. Passing a float from the model to the form causes the transformation to fail

Possible Solution
Remove the option input: string from the TypeGuesser or allow values which are already a float to pass the transformer.
Why this option is added for a DecimalType (as a default) in the first place is a riddle to me.

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