You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 4.4 branch.
Discussion
----------
[Serializer] Make document type nodes ignorable
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#44363
| License | MIT
| Doc PR | -
As described in #44363: while looping over all nodes, the current node is checked against the list of ignored node types before throwing the `NotEncodableValueException` if it's a document type node.
Commits
-------
2c75e27 Make document type nodes ignorable
Symfony version(s) affected
4.4, 5.3, 5.4, 6.0
Description
When decoding XML using the
XmlEncoder
, ignoring the document type node with thedecoder_ignored_node_types
option is not possible.How to reproduce
Using the
XmlEncoder
with the document type node included in the ignore nodesthrows a
NotEncodableValueException
becauseDocument types are not allowed
.Possible Solution
Consider the ignored node types before checking the current node in the
decode
function:Additional Context
No response
The text was updated successfully, but these errors were encountered: