Skip to content

Commit

Permalink
add denormalization
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Aug 28, 2024
1 parent a737e30 commit 4775d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function denormalize(array $payload, string $class): mixed
// Blank string is converted to null, which then makes the "string" type invalid - even for an optional property.
// by denormalizing, we avoid this scenario, as the prop is dropped, but the validator will still enforce if required!
// ie, we need this to get an object - of some form - into the validator!!!!
$payload = $serializer->denormalize(json_encode($payload), $class, null, [AbstractObjectNormalizer::SKIP_NULL_VALUES => true]);]
$payload = $serializer->denormalize(json_encode($payload), $class, null, [AbstractObjectNormalizer::SKIP_NULL_VALUES => true]);

return $payload;

Expand Down

0 comments on commit 4775d99

Please sign in to comment.