Skip to content

Commit d29d20e

Browse files
committed
fix: symfony serializer null_values configuration
1 parent 38046e9 commit d29d20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Serializer/SymfonySerializerAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public function __construct(SerializerInterface $serializer)
3434
public function serialize($data, $format, Context $context)
3535
{
3636
$newContext = $this->convertContext($context);
37-
$newContext['serializeNull'] = $context->getSerializeNull();
3837

3938
return $this->serializer->serialize($data, $format, $newContext);
4039
}
@@ -65,6 +64,7 @@ private function convertContext(Context $context)
6564
$newContext['version'] = $context->getVersion();
6665
$newContext['maxDepth'] = $context->getMaxDepth(false);
6766
$newContext['enable_max_depth'] = $context->isMaxDepthEnabled();
67+
$newContext['skip_null_values'] = !$context->getSerializeNull();
6868

6969
return $newContext;
7070
}

0 commit comments

Comments
 (0)