From 05b6ce448f788d26866862187e1a6c81f8ee5fd9 Mon Sep 17 00:00:00 2001 From: Enzo Santamaria <62953579+Enz000@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:32:24 +0100 Subject: [PATCH] add note in DiscriminatorMap section --- components/serializer.rst | 5 +++++ 1 file changed, 5 insertions(+) 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');