8000 Update changelog · symfony/symfony@19aee3d · GitHub
[go: up one dir, main page]

Skip to content

Commit 19aee3d

Browse files
committed
Update changelog
1 parent ff1727e commit 19aee3d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Symfony/Component/Serializer/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ CHANGELOG
66

77
* `AbstractNormalizer::handleCircularReference` is now final, and receives two optional extra arguments: the format and the context
88
* added support for XML comment encoding (encoding `['#comment' => ' foo ']` results `<!-- foo -->`)
9+
* added optional `int[] $encoderIgnoredNodeTypes` argument to `XmlEncoder::__construct` to configure node types to be
10+
ignored during encodage.
911

1012
4.1.0
1113
-----

src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ private function buildXml(\DOMNode $parentNode, $data, string $xmlRootNodeName 730E =
377377
$parentNode->setAttribute($attributeName, $data);
378378
} elseif ('#' === $key) {
379379
$append = $this->selectNodeType($parentNode, $data);
380-
} elseif ('#comment' === $key) {
380+
} elseif ('#comment' === $key && !\in_array(XML_COMMENT_NODE, $this->encoderIgnoredNodeTypes, true)) {
381381
$append = $this->appendComment($parentNode, $data);
382382
} elseif (\is_array($data) && false === is_numeric($key)) {
383383
// Is this array fully numeric keys?

0 commit comments

Comments
 (0)
0