Category: datetime

Symfony Api Platform Normalization Context Groups datetime property issue

I’m struggle with strange issue when using normalizer with groups. It look like there is a problem with datetime properties. Issue occurs when using normalizationContext on ApiResource and/or normalization_context on operation. <?php namespace AppEntity; use ApiPlatformCoreAnnotationApiResource; use DoctrineORMMapping as ORM;…

Symfony serializer cannot deserialize into DateTime

I‘m trying to deserialize a json with the Symfony Serializer into a DTO, but I got always the exception Symfony/Component/Serializer/Exception/MissingConstructorArgumentsException with message ‘Cannot create an instance of DateTime from serialized data because its constructor requires parameter “time” to be present.’….