Skip to content

Commit

Permalink
fix: Set context when serializing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston-paddle committed Oct 12, 2024
1 parent 877b61b commit 37ef0b3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,7 @@ private function requestRaw(string $method, string|UriInterface $uri, array|\Jso
$request = $this->requestFactory->createRequest($method, $uri);

$serializer = new Serializer(
[
new BackedEnumNormalizer(),
new JsonSerializableNormalizer(),
new ObjectNormalizer(
nameConverter: new CamelCaseToSnakeCaseNameConverter(),
defaultContext: [
AbstractObjectNormalizer::PRESERVE_EMPTY_OBJECTS => true,
],
),
],
[new BackedEnumNormalizer(), new JsonSerializableNormalizer(), new ObjectNormalizer(nameConverter: new CamelCaseToSnakeCaseNameConverter())],
[new JsonEncoder()],
);

Expand Down

0 comments on commit 37ef0b3

Please sign in to comment.