diff --git a/Parser/FormTypeParser.php b/Parser/FormTypeParser.php index 25a73bd3c..b722c1e1d 100644 --- a/Parser/FormTypeParser.php +++ b/Parser/FormTypeParser.php @@ -90,6 +90,8 @@ private function parseForm($form, $prefix = null) for ($type = $config->getType(); null !== $type; $type = $type->getParent()) { if (isset($this->mapTypes[$type->getName()])) { $bestType = $this->mapTypes[$type->getName()]; + } elseif ('collection' === $type->getName() && isset($this->mapTypes[$config->getOption('type')])) { + $bestType = sprintf('array of %ss', $this->mapTypes[$config->getOption('type')]); } }