API Platform version(s) affected: 4.2.17
Description
Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']) will return object, not string
How to reproduce
#[
ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true, options: ['comment' => '最后登录']),
Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']),
ApiProperty(writable: false)
]
#[Groups(['employee.read'])]
public ?\DateTimeImmutable $lastLogin = null;
Possible Solution
4.2.15 it is ok
this is 4.2.15

this is 4.2.17
