From 85ad399b93f100315b9a0e49dbf3bca71bf2e29d Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Thu, 13 Oct 2022 23:27:00 +0200 Subject: [PATCH] [Serializer] Add PropertyNormalizer::NORMALIZE_VISIBILITY documentation --- components/serializer.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/serializer.rst b/components/serializer.rst index c4ed5b8ce0a..5dc2083fcf6 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -797,6 +797,12 @@ The Serializer component provides several built-in normalizers: parent classes) by using `PHP reflection`_. It supports calling the constructor during the denormalization process. +.. versionadded:: 6.2 + + You can change normalization visibility by setting the serializer context option + ``PropertyNormalizer::NORMALIZE_VISIBILITY`` and combine ``PropertyNormalizer::NORMALIZE_PUBLIC``, + ``PropertyNormalizer::NORMALIZE_PROTECTED`` or ``PropertyNormalizer::NORMALIZE_PRIVATE``. + Objects are normalized to a map of property names to property values. :class:`Symfony\\Component\\Serializer\\Normalizer\\JsonSerializableNormalizer`