Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,11 @@ and ``BitBucketCodeRepository`` classes:
</class>
</serializer>
.. 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');
Expand Down