Commit 887c7b0
committed
bug #49009 [Form] Cast choices value callback result to string (Matth--)
This PR was merged into the 5.4 branch.
Discussion
----------
[Form] Cast choices value callback result to string
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #42394
| License | MIT
| Doc PR | X
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.
Commits
-------
be58048 [Form] Cast choices value callback result to string2 files changed
Lines changed: 13 additions & 1 deletion
File tree
- src/Symfony/Component/Form
- ChoiceList/Loader
- Tests/ChoiceList/Loader
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| |||
0 commit comments