Skip to content

Commit 05b6ce4

Browse files
Enz000javiereguiluz
authored andcommitted
add note in DiscriminatorMap section
1 parent 4a89412 commit 05b6ce4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/serializer.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,6 +1837,11 @@ and ``BitBucketCodeRepository`` classes:
18371837
</class>
18381838
</serializer>
18391839
1840+
.. note::
1841+
1842+
The values of the array parameter `mapping` should be strings.
1843+
Otherwise, it will implicitly be cast into strings.
1844+
18401845
Once configured, the serializer uses the mapping to pick the correct class::
18411846

18421847
$serialized = $serializer->serialize(new GitHubCodeRepository(), 'json');

0 commit comments

Comments
 (0)