Skip to content

Commit 87b1a79

Browse files
committed
minor #17347 [Serializer] Add PropertyNormalizer::NORMALIZE_VISIBILITY documentation (alamirault)
This PR was merged into the 6.2 branch. Discussion ---------- [Serializer] Add PropertyNormalizer::NORMALIZE_VISIBILITY documentation Try documenting #17036 Commits ------- 85ad399 [Serializer] Add PropertyNormalizer::NORMALIZE_VISIBILITY documentation
2 parents 2c26d77 + 85ad399 commit 87b1a79

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/serializer.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,12 @@ The Serializer component provides several built-in normalizers:
797797
parent classes) by using `PHP reflection`_. It supports calling the constructor
798798
during the denormalization process.
799799

800+
.. versionadded:: 6.2
801+
802+
You can change normalization visibility by setting the serializer context option
803+
``PropertyNormalizer::NORMALIZE_VISIBILITY`` and combine ``PropertyNormalizer::NORMALIZE_PUBLIC``,
804+
``PropertyNormalizer::NORMALIZE_PROTECTED`` or ``PropertyNormalizer::NORMALIZE_PRIVATE``.
805+
800806
Objects are normalized to a map of property names to property values.
801807

802808
:class:`Symfony\\Component\\Serializer\\Normalizer\\JsonSerializableNormalizer`

0 commit comments

Comments
 (0)