[Form] Cast choices value callback result to string#49009
Merged
Conversation
040c4d0 to
9b37a6e
Compare
Contributor
Author
|
Not sure what to do about the failing test as the |
Member
|
high-deps will be fixed once the PR is merged up. But low-deps requires a change in the lowest bound of the constraint in the doctrine-bridge |
Contributor
Author
|
@stof I could also remove the test case as it does pretty much the same thing as the one in the Form component. I added it in the first case because I had issues with the EntityType. WDYT? |
9b37a6e to
11b3b5d
Compare
Contributor
Author
|
Is there anything I should change for this PR? Or should we find a different solution to this. Sorry for the tag |
If using "multiple" and "choice_value" on a CollectionType or EntityType, the result for the callback needs to be a string. By forcing a string cast, default values will show up in the form view.
11b3b5d to
be58048
Compare
Member
|
Thank you @Matth--. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using "multiple" and "choice_value" callback on a CollectionType or EntityType, the result for the callback needs to be a string. By forcing a string cast, default values will show up in the form view.