Skip to content
Permalink
Browse files

bug #30396 [Form] Avoid a form type extension appears many times in d…

…ebug:form (markitosgv)

This PR was merged into the 4.2 branch.

Discussion
----------

[Form] Avoid a form type extension appears many times in debug:form

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30394    <!-- #-prefixed issue number(s), if any -->
| License       | MIT

This PR fixes #30394. Avoid a form type extension appears many times in debug:form command. This is caused by new 4.2 feature getExtendedTypes().

Commits
-------

c4be39c [Form] Fixes debug:form appears many times as type extensions configured with new getExtendedTypes method
  • Loading branch information...
nicolas-grekas committed Mar 7, 2019
2 parents e74e0f9 + c4be39c commit eb2972e7f7acda0f5f189d867d08074307721c14
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Symfony/Component/Form/DependencyInjection/FormPass.php
@@ -102,9 +102,9 @@ private function processFormTypeExtensions(ContainerBuilder $container)
} elseif (method_exists($serviceDefinition->getClass(), 'getExtendedTypes')) {
$extendsTypes = false;
$typeExtensionsClasses[] = $serviceDefinition->getClass();
foreach ($serviceDefinition->getClass()::getExtendedTypes() as $extendedType) {
$typeExtensions[$extendedType][] = new Reference($serviceId);
$typeExtensionsClasses[] = $serviceDefinition->getClass();
$extendsTypes = true;
}

0 comments on commit eb2972e

Please sign in to comment.
You can’t perform that action at this time.