From 28ffdc94ed6da87d3e5fcc21aa7f1ee1b3d95bf8 Mon Sep 17 00:00:00 2001 From: Perreal Guillaume <guillaume.perreal@irstea.fr> Date: Fri, 15 Feb 2019 13:18:18 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20o=C3=B9=20API-platfor?= =?UTF-8?q?m=20ne=20retrouve=20pas=20le=20namespace=20de=20UuidInterface.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TypeFactory.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/TypeFactory.php b/src/TypeFactory.php index c0f9b6c..33655da 100644 --- a/src/TypeFactory.php +++ b/src/TypeFactory.php @@ -60,6 +60,11 @@ final class TypeFactory implements TypeFactoryInterface, \IteratorAggregate */ public function get(string $name): Type { + // API-platform semble avoir un problème avec les types utilisés dans un Trait. + if (strpos($name, '\UuidInterface') !== false) { + $name = 'Ramsey\Uuid\UuidInterface'; + } + if (!isset($this->types[$name])) { throw new TypeNotFoundException("unknown type ${name}"); } -- GitLab