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.

Showing with 5 additions and 0 deletions
+5 -0
......@@ -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}");
}
......
Supports Markdown
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