From 1bd307a849e40f60b43eaeac910c2339d458872c Mon Sep 17 00:00:00 2001 From: Thomas Rabaix Date: Fri, 20 Nov 2015 23:53:40 +0100 Subject: [PATCH 1/2] fix type assignement --- src/Symfony/Component/Form/FormRegistry.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 49db05ba5fd15..513505e5eb6ad 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -88,7 +88,7 @@ public function getType($name) } } - $this->resolveAndAddType($type); + $this->types[$name] = $this->resolveAndAddType($type); } return $this->types[$name]; @@ -115,13 +115,11 @@ private function resolveAndAddType(FormTypeInterface $type) ); } - $resolvedType = $this->resolvedTypeFactory->createResolvedType( + return $this->resolvedTypeFactory->createResolvedType( $type, $typeExtensions, $parentType ? $this->getType($parentType) : null ); - - $this->types[$fqcn] = $resolvedType; } /** From 6d22d5cd16feacd488994202549a932f81bab75f Mon Sep 17 00:00:00 2001 From: Thomas Rabaix Date: Mon, 23 Nov 2015 18:54:21 +0100 Subject: [PATCH 2/2] fix rename resolve type function --- src/Symfony/Component/Form/FormRegistry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 513505e5eb6ad..b449f20315d03 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -88,7 +88,7 @@ public function getType($name) } } - $this->types[$name] = $this->resolveAndAddType($type); + $this->types[$name] = $this->resolveType($type); } return $this->types[$name]; @@ -102,7 +102,7 @@ public function getType($name) * * @return ResolvedFormTypeInterface The resolved type. */ - private function resolveAndAddType(FormTypeInterface $type) + private function resolveType(FormTypeInterface $type) { $typeExtensions = array(); $parentType = $type->getParent();