Skip to content

Commit e4c56f2

Browse files
committed
minor symfony#31143 ChoiceType callable deprecation after/before seems wrong (Simperfit)
This PR was merged into the 3.4 branch. Discussion ---------- ChoiceType callable deprecation after/before seems wrong | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | none <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | none <!-- required for new features --> <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Was looking at the upgrade file because I'm upgrade an app right now, and just see that mistake I made 3 years ago !! Commits ------- 11ee84c minor: ChoiceType callable deprecation after/before seems wrong
2 parents 11f04ab + 11ee84c commit e4c56f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

UPGRADE-4.0.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,17 @@ Form
297297
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed.
298298

299299
* Using callable strings as choice options in ChoiceType is not supported
300-
anymore in favor of passing PropertyPath instances.
300+
anymore.
301301

302302
Before:
303303

304304
```php
305-
'choice_value' => new PropertyPath('range'),
306305
'choice_label' => 'strtoupper',
307306
```
308307

309308
After:
310309

311310
```php
312-
'choice_value' => 'range',
313311
'choice_label' => function ($choice) {
314312
return strtoupper($choice);
315313
},

0 commit comments

Comments
 (0)