File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -706,24 +706,12 @@ always as a collection.
706706
707707.. tip ::
708708
709- Processing of XML comments can be controlled with the third constructor
710- argument:
709+ XML comments are ignored by default when decoding contents, but this
710+ behavior can be changed with the optional ``$ignoredNodeTypes `` argument of
711+ the ``XmlEncoder `` class constructor.
711712
712- .. code-block :: php
713-
714- class XmlEncoder
715- {
716- public function __construct(
717- string $rootNodeName = 'response',
718- int $loadOptions = null,
719- array $ignoredNodeTypes = array(XML_PI_NODE, XML_COMMENT_NODE)
720- ) {
721- // ...
722- }
723- }
724-
725- .. versionadded :: 4.1
726- XML comments are removed by default since Symfony 4.1.
713+ .. versionadded :: 4.1
714+ XML comments are ignored by default starting from Symfony 4.1.
727715
728716The ``YamlEncoder ``
729717~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments