8000 [Form] ValueToStringTransformer Behaviour With Null/Empty Values · Issue #4648 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pocallaghan opened this issue Jun 25, 2012 · 1 comment
Closed
Labels

Comments

@pocallaghan
Copy link

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"

@webmozart
Copy link
Contributor

Thank you for the feedback! ValueTostringTransformer will be removed again in 2.1. See #4102.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0