Commit 28ffdc94 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Correction d'un bug où API-platform ne retrouve pas le namespace de UuidInterface.

parent 6f1ce66e
......@@ -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}");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment