Skip to content

Commit

Permalink
bug #30396 [Form] Avoid a form type extension appears many times in d…
Browse files Browse the repository at this point in the history
…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 eb2972e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
}

Expand Down

0 comments on commit eb2972e

Please sign in to comment.