diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 49db05ba5f..b449f20315 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -88,7 +88,7 @@ class FormRegistry implements FormRegistryInterface } } - $this->resolveAndAddType($type); + $this->types[$name] = $this->resolveType($type); } return $this->types[$name]; @@ -102,7 +102,7 @@ class FormRegistry implements FormRegistryInterface * * @return ResolvedFormTypeInterface The resolved type. */ - private function resolveAndAddType(FormTypeInterface $type) + private function resolveType(FormTypeInterface $type) { $typeExtensions = array(); $parentType = $type->getParent(); @@ -115,13 +115,11 @@ class FormRegistry implements FormRegistryInterface ); } - $resolvedType = $this->resolvedTypeFactory->createResolvedType( + return $this->resolvedTypeFactory->createResolvedType( $type, $typeExtensions, $parentType ? $this->getType($parentType) : null ); - - $this->types[$fqcn] = $resolvedType; } /**