From 619ae0d5aee31b58e77bad503f3c861b2adb2bf6 Mon Sep 17 00:00:00 2001 From: Guilhem N Date: Fri, 27 Jul 2018 08:30:22 +0200 Subject: [PATCH] Support doctrine Collection (#1369) --- ModelDescriber/ObjectModelDescriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModelDescriber/ObjectModelDescriber.php b/ModelDescriber/ObjectModelDescriber.php index 55b6340..8c726c9 100644 --- a/ModelDescriber/ObjectModelDescriber.php +++ b/ModelDescriber/ObjectModelDescriber.php @@ -86,7 +86,7 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar } $type = $types[0]; - if (Type::BUILTIN_TYPE_ARRAY === $type->getBuiltinType()) { + if ($type->isCollection()) { $type = $type->getCollectionValueType(); if (null === $type) { throw new \LogicException(sprintf('Property "%s:%s" is an array, but no indication of the array elements are made. Use e.g. string[] for an array of string.', $class, $propertyName));