8000 minor #31779 [Form] do not iterate twice on the extended types (Tobion) · symfony/symfony@371dfc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 371dfc7

Browse files
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 ------- 75179d3 [Form] do not iterate twice on the extended types
2 parents 343da8c + 75179d3 commit 371dfc7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Symfony/Component/Form/AbstractExtension.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,7 @@ private function initTypeExtensions()
175175
throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInterface');
176176
}
177177

178-
$extendedTypes = [];
179178
foreach ($extension::getExtendedTypes() as $extendedType) {
180-
$extendedTypes[] = $extendedType;
181-
}
182-
183-
foreach ($extendedTypes as $extendedType) {
184179
$this->typeExtensions[$extendedType][] = $extension;
185180
}
186181
}

0 commit comments

Comments
 (0)
0