Closed
Description
Symfony version(s) affected
7.1
Description
I got an error when deserializing an ArrayObject
with annotation
Undefined variable $class at symfony/serializer/Normalizer/AbstractObjectNormalizer.php:753
How to reproduce
final readonly class Dto
{
/**
* @param ArrayObject<string,mixed> $prop
*/
public function __construct(
public ArrayObject $prop
) {
}
}
$data = '{"prop": {"key": "value"}}';
$serializer->deserialize($data, Dto::class, 'json');
Possible Solution
Removing the annotation will fix the issue. But, static analyzers will complain about that
Additional Context
No response