Skip to content

Commit

Permalink
Fixed normalize dto temporal (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
root-aza authored Dec 9, 2024
1 parent ee5e35b commit a07b01c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/DataConverter/SymfonySerializerDataConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@ public function toPayload($value): Payload
EncodingKeys::METADATA_ENCODING_KEY => $this->getEncodingType(),
];

$context = [];
$context = [ObjectNormalizer::PRESERVE_EMPTY_OBJECTS => true];

if (is_object($value)) {
$metadata[self::INPUT_TYPE] = $value::class;

if (str_starts_with($value::class, 'Temporal\\')) {
$context[ObjectNormalizer::PRESERVE_EMPTY_OBJECTS] = true;
}
}

try {
Expand Down

0 comments on commit a07b01c

Please # to comment.