Skip to content

[Form] ValueToStringTransformer Behaviour With Null/Empty Values #4648

Closed
@pocallaghan

Description

@pocallaghan

Both the transform and reverseTransform methods perform the same action with regards to null / empty strings. Both functions check if the value is null and return an empty string. Judging by the DocBlock comments in the DataTransformerInterface the behaviour of reverseTransform should be to check if the passed value is an empty string, and return NULL in it's place, thus performing the inverse action of the transform method.

Edit: Thought I'd best mention my version...
"package": "symfony/symfony",
"version": "dev-master",
"source-reference": "d0e154725c85a3ec5bc6760a59cc2769b8a17ae5"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions