Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions serializer/encoders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,16 @@ These are the options available on the :ref:`serializer context <serializer-cont
``cdata_wrapping_pattern`` (default: ````/[<>&]/````)
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``::

Expand Down
Loading