This PR was merged into the 2.7 branch.
Discussion
----------
Documenting how to keep option value BC - see #14377
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14377 (kinda)
| License | MIT
| Doc PR | symfony/symfony-docs#5179
Hi guys!
I'm still making sense of the form changes, but it seems that this before and after isn't totally honest - your option values will change, unless your add this extra option.
@webmozart look correct to you?
Thanks!
Commits
-------
deb9db8
Documenting how to keep option value BC - see #14377
This commit is contained in:
commit
b3b1c459b3
|
@ -134,6 +134,11 @@ Form
|
|||
'Ignored' => Status::IGNORED,
|
||||
),
|
||||
'choices_as_values' => true,
|
||||
// important if you rely on your option value attribute (e.g. for JavaScript)
|
||||
// this will keep the same functionality as before
|
||||
'choice_value' => function ($choice) {
|
||||
return $choice;
|
||||
},
|
||||
));
|
||||
```
|
||||
|
||||
|
|
Reference in New Issue