-
-
Notifications
You must be signed in to change notification settings - Fork 940
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 strings (therefore not objects):
- Corrected schema generation for
array<string, T>,object,?array,?objectand?type#3402 (comment) - Corrected schema generation for
array<string, T>,object,?array,?objectand?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)];