8000 minor #10317 [Serializer] Allow to access extra infos in name convert… · symfony/symfony-docs@0907554 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0907554

Browse files
committed
minor #10317 [Serializer] Allow to access extra infos in name converters (dunglas, javiereguiluz)
This PR was merged into the master branch. Discussion ---------- [Serializer] Allow to access extra infos in name converters symfony/symfony#27021 Commits ------- 71afdca Minor reword ae63f8a Add a note block ca5e2e0 [Serializer] Allow to access extra infos in name converters
2 parents 97c4e68 + 71afdca commit 0907554

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/serializer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,15 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
481481
$companyCopy = $serializer->deserialize($json, Company::class, 'json');
482482
// Same data as $company
483483

484+
.. note::
485+
486+
You can also implement
487+
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface`
488+
to access to the current class name, format and context.
489+
490+
.. versionadded:: 4.2
491+
The ``AdvancedNameConverterInterface`` interface was introduced in Symfony 4.2.
492+
484493
.. _using-camelized-method-names-for-underscored-attributes:
485494

486495
CamelCase to snake_case

0 commit comments

Comments
 (0)
0