From 0776cba27ef9aeed25406477e7c6a8c19425164d Mon Sep 17 00:00:00 2001 From: Quentin Dequippe Date: Mon, 28 Oct 2024 18:41:54 +0400 Subject: [PATCH] [Serializer] Documentation for xml empty attribute --- serializer/encoders.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/serializer/encoders.rst b/serializer/encoders.rst index d5a98356156..2e5c0e6e66a 100644 --- a/serializer/encoders.rst +++ b/serializer/encoders.rst @@ -205,11 +205,16 @@ These are the options available on the :ref:`serializer context &]/````) A regular expression pattern to determine if a value should be wrapped in a CDATA section. +``ignore_empty_attributes`` (default: ``false``) + If set to true, ignores all attributes with empty values in the generated XML .. versionadded:: 7.1 The ``cdata_wrapping_pattern`` option was introduced in Symfony 7.1. +.. versionadded:: 7.3 + + The ``ignore_empty_attributes`` option was introduced in Symfony 7.3. Example with a custom ``context``::