Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Fix handling empty data in ValueToDuplicatesTransformer #57920

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

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Aug 5, 2024

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #47013
License MIT

The transformer receives the data of child forms that have already been through the transformation schema. If no custom view transformer was used on that child form the empty would already have been changed to null. Thus, receiving an empty string here means that the child form explicitly asked for it and the value must not be exchanged with null.

The transformer receives the data of child forms that have already been
through the transformation schema. If no custom view transformer was used
on that child form the empty would already have been changed to null.
Thus, receiving an empty string here means that the child form explicitly
asked for it and the value must not be exchanged with null.
@xabbuh xabbuh requested a review from yceruto as a code owner August 5, 2024 08:54
@carsonbot carsonbot added this to the 5.4 milestone Aug 5, 2024
@carsonbot carsonbot changed the title [Form] fix handling empty data in ValueToDuplicatesTransformer [Form]  fix handling empty data in ValueToDuplicatesTransformer Aug 5, 2024
Copy link
Member

@yceruto yceruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me. Simple, thanks!

@nicolas-grekas nicolas-grekas changed the title [Form]  fix handling empty data in ValueToDuplicatesTransformer [Form] Fix handling empty data in ValueToDuplicatesTransformer Aug 8, 2024
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit b300b60 into symfony:5.4 Aug 8, 2024
11 of 12 checks passed
@xabbuh xabbuh deleted the issue-47013 branch August 8, 2024 09:14
This was referenced Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants