8000 Documenting how to keep option value BC - see #14377 · symfony/symfony@deb9db8 · GitHub
[go: up one dir, main page]

Skip to content

Commit deb9db8

Browse files
committed
Documenting how to keep option value BC - see #14377
1 parent 1dbf67e commit deb9db8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

UPGRADE-2.7.md

Lines changed: 5 additions & 0 deletions
6547
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ Form
144144
'Ignored' => Status::IGNORED,
145145
),
146146
'choices_as_values' => true,
147+
// important if you rely on your option value attribute (e.g. for JavaScript)
148+
// this will keep the same functionality as before
149+
'choice_value' => function ($choice) {
150+
return $choice;
151+
},
147152
));
148153
```
149154

0 commit comments

Comments
 (0)
0