diff --git a/CHANGELOG b/CHANGELOG index d43b178..db3943f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ 3.10.1 (unreleased): * Fix: autoincrement fields are now properly registered when using attributes + * Fix: allow null when using symfony/serializer 3.10.0 (2025-03-14): * Feature: Allow complex types to be handled by symfony/serializer if available diff --git a/src/TingBundle/Serializer/SymfonySerializer.php b/src/TingBundle/Serializer/SymfonySerializer.php index 226d9cb..cc3fdb8 100644 --- a/src/TingBundle/Serializer/SymfonySerializer.php +++ b/src/TingBundle/Serializer/SymfonySerializer.php @@ -16,6 +16,9 @@ public function serialize($toSerialize, array $options = []) public function unserialize($serialized, array $options = []) { + if ($serialized === null) { + return null; + } $this->throwOnNullSerializer(); if (!isset($options['type'])) { throw new \RuntimeException('SymfonySerializer requires type option to be set');