Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commit2e6982a
committed
minor#18316 [Form] remove useless copy in ChoiceType (HeahDude)
This PR was merged into the 2.7 branch.Discussion----------[Form] remove useless copy in ChoiceType| Q | A| ------------- | ---| Branch? | 2.7+| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR |symfony/symfony-docs#6393`ChoiceListFactoryInterface` expected `$groupBy` to be a callable or null, not an array ([ref](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php#L111)).The factory defaults `groupBy` to `ChoiceListInterface::getStructuredValues()` ([ref](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php#L122)).Hence, the copy of the choices array and the recursive flip are useless and may be slowing down performances imho (especially with `EntityType`).Commits-------562f5e4 [Form] remove useless code in ChoiceTypeFile tree
1 file changed
+1
-24
lines changed- src/Symfony/Component/Form/Extension/Core/Type
1 file changed
+1
-24
lines changedLines changed: 1 addition & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | 434 | | |
450 | 435 | | |
451 | 436 | | |
| |||
503 | 488 | | |
504 | 489 | | |
505 | 490 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | 491 | | |
515 | 492 | | |
516 | 493 | | |
| |||
0 commit comments
Comments
(0)