Skip to content

Commit d3ac16f

Browse files
committed
minor #19426 [Serializer] add note in DiscriminatorMap section (Enz000)
This PR was submitted for the 7.0 branch but it was merged into the 6.3 branch instead. Discussion ---------- [Serializer] add note in DiscriminatorMap section Regarding this [issue](symfony/symfony#53387) I added a note about the discriminator map Commits ------- 05b6ce4 add note in DiscriminatorMap section
2 parents 4a89412 + 05b6ce4 commit d3ac16f

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)