File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,10 @@ These are the options available on the :ref:`serializer context <serializer-cont
205
205
``cdata_wrapping_pattern `` (default: ``/[<>&]/ ``)
206
206
A regular expression pattern to determine if a value should be wrapped
207
207
in a CDATA section.
208
+ ``cdata_wrapping_name_pattern `` (default: ``false ``)
209
+ A regular expression pattern that defines the names of fields whose values
210
+ should always be wrapped in a CDATA section, even if their contents don't
211
+ require it. Example: ``'/(firstname|lastname)/' ``
208
212
``ignore_empty_attributes `` (default: ``false ``)
209
213
If set to true, ignores all attributes with empty values in the generated XML
210
214
@@ -216,6 +220,10 @@ These are the options available on the :ref:`serializer context <serializer-cont
216
220
217
221
The ``ignore_empty_attributes `` option was introduced in Symfony 7.3.
218
222
223
+ .. versionadded :: 7.4
224
+
225
+ The ``cdata_wrapping_name_pattern `` option was introduced in Symfony 7.4.
226
+
219
227
Example with a custom ``context ``::
220
228
221
229
use Symfony\Component\Serializer\Encoder\XmlEncoder;
You can’t perform that action at this time.
0 commit comments