Skip to content

Commit a6aa08a

Browse files
committed
No longer format documents by default and remove NS_CLEAN option: both mess up the position of xmlns-attributes
1 parent 2396954 commit a6aa08a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/DOMDocumentFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class DOMDocumentFactory
2424
* @var non-negative-int
2525
* TODO: Add LIBXML_NO_XXE to the defaults when PHP 8.4.0 + libxml 2.13.0 become generally available
2626
*/
27-
public const DEFAULT_OPTIONS = LIBXML_COMPACT | LIBXML_NONET | LIBXML_NSCLEAN;
27+
public const DEFAULT_OPTIONS = LIBXML_COMPACT | LIBXML_NONET;
2828

2929

3030
/**

src/SerializableElementTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ trait SerializableElementTrait
2020
/**
2121
* Whether to format the string output of this element or not.
2222
*
23-
* Defaults to true. Override to disable output formatting.
23+
* Defaults to false. Override to disable output formatting.
2424
*
2525
* @var bool
2626
*/
27-
protected bool $formatOutput = true;
27+
protected bool $formatOutput = false;
2828

2929

3030
/**

0 commit comments

Comments
 (0)