Closed
Description
Symfony version(s) affected: 5.3.3
Description
Denormalizer breaks with an error Data expected to be an array, string given.
when it handles an object, which contains a generic-like annotation, but is not an array or iterable.
How to reproduce
interface Foo {}
/** @template TFoo of Foo */
interface Bar {}
final class FooBar {
/** @var Bar<Foo> */
public Bar $bar; // This prop will fail
// ...
}
Possible Solution
I digged it in PhpDocTypeHelper, which is part of phpDocumentor, so I don't know how to solve it. 😟