minor #31779 [Form] do not iterate twice on the extended types (Tobion)
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] do not iterate twice on the extended types
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Simplification of #31703
Commits
-------
75179d3114
[Form] do not iterate twice on the extended types
This commit is contained in:
commit
371dfc7f45
@ -175,12 +175,7 @@ abstract class AbstractExtension implements FormExtensionInterface
|
||||
throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInterface');
|
||||
}
|
||||
|
||||
$extendedTypes = [];
|
||||
foreach ($extension::getExtendedTypes() as $extendedType) {
|
||||
$extendedTypes[] = $extendedType;
|
||||
}
|
||||
|
||||
foreach ($extendedTypes as $extendedType) {
|
||||
$this->typeExtensions[$extendedType][] = $extension;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user