fix type assignement

This commit is contained in:
Thomas Rabaix 2015-11-20 23:53:40 +01:00 committed by Fabien Potencier
parent 4d2ea16b90
commit cc2645404a

View File

@ -88,7 +88,7 @@ class FormRegistry implements FormRegistryInterface
} }
} }
$this->resolveAndAddType($type); $this->types[$name] = $this->resolveType($type);
} }
return $this->types[$name]; return $this->types[$name];
@ -102,7 +102,7 @@ class FormRegistry implements FormRegistryInterface
* *
* @return ResolvedFormTypeInterface The resolved type. * @return ResolvedFormTypeInterface The resolved type.
*/ */
private function resolveAndAddType(FormTypeInterface $type) private function resolveType(FormTypeInterface $type)
{ {
$typeExtensions = array(); $typeExtensions = array();
$parentType = $type->getParent(); $parentType = $type->getParent();
@ -115,13 +115,11 @@ class FormRegistry implements FormRegistryInterface
); );
} }
$resolvedType = $this->resolvedTypeFactory->createResolvedType( return $this->resolvedTypeFactory->createResolvedType(
$type, $type,
$typeExtensions, $typeExtensions,
$parentType ? $this->getType($parentType) : null $parentType ? $this->getType($parentType) : null
); );
$this->types[$fqcn] = $resolvedType;
} }
/** /**