-
-
Notifications
You must be signed in to change notification settings - Fork 924
Closed
Description
API Platform version(s) affected: 2.5.x
Description
In our tests for TypeFactory
:
yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT)];
yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, true)];
// ...
yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)];
yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, true, Dummy::class)];
While reviewing #3402, @dunglas found a potential BC break with objects that may be used in URIs as string
s (therefore not objects
):
- Corrected schema generation for
array<string, T>
,object
,?array
,?object
and?type
#3402 (comment) - Corrected schema generation for
array<string, T>
,object
,?array
,?object
and?type
#3402 (comment)
How to reproduce
The test should instead convert object
to object
:
yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT)];
yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, true)];
// ...
yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)];
yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, true, Dummy::class)];