Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0907554

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 converterssymfony/symfony#27021Commits-------71afdca Minor rewordae63f8a Add a note blockca5e2e0 [Serializer] Allow to access extra infos in name converters
2 parents97c4e68 +71afdca commit0907554

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)

[8]ページ先頭

©2009-2025 Movatter.jp