diff --git a/components/serializer.rst b/components/serializer.rst index a1a281f63c8..a58bdf1fd85 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -1837,6 +1837,11 @@ and ``BitBucketCodeRepository`` classes: +.. note:: + + The values of the array parameter `mapping` should be strings. + Otherwise, it will implicitly be cast into strings. + Once configured, the serializer uses the mapping to pick the correct class:: $serialized = $serializer->serialize(new GitHubCodeRepository(), 'json');