minor: ChoiceType callable deprecation after/before seems wrong
That is on me 3 years ago !
This commit is contained in:
parent
a288a74d74
commit
11ee84c09e
|
@ -297,19 +297,17 @@ Form
|
|||
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed.
|
||||
|
||||
* Using callable strings as choice options in ChoiceType is not supported
|
||||
anymore in favor of passing PropertyPath instances.
|
||||
anymore.
|
||||
|
||||
Before:
|
||||
|
||||
```php
|
||||
'choice_value' => new PropertyPath('range'),
|
||||
'choice_label' => 'strtoupper',
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```php
|
||||
'choice_value' => 'range',
|
||||
'choice_label' => function ($choice) {
|
||||
return strtoupper($choice);
|
||||
},
|
||||
|
|
Reference in New Issue