Thanks to visit codestin.com
Credit goes to github.com

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
9 changes: 9 additions & 0 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,16 @@ Option Description
``save_options`` XML saving `options with libxml`_ ``0``
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
generated XML
``cdata_wrapping`` If set to false, will not wrap any value ``true``
containing one of the following characters (
``<``, ``>``, ``&``) in `a CDATA section`_ like
following: ``<![CDATA[...]]>``
============================== ================================================= ==========================

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a versionadded directive, you can find some as example in other files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.. versionadded:: 6.4

The `cdata_wrapping` option was introduced in Symfony 6.4.

Example with custom ``context``::

use Symfony\Component\Serializer\Encoder\XmlEncoder;
Expand Down Expand Up @@ -1936,3 +1944,4 @@ Learn more
.. _`data URI`: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
.. _seld/jsonlint: https://github.com/Seldaek/jsonlint
.. _$flags: https://www.php.net/manual/en/json.constants.php
.. _`a CDATA section`: https://en.wikipedia.org/wiki/CDATA