Skip to content

Commit 4630245

Browse files
authored
Reorganize PHP extension requirements in composer.json (#49)
1 parent 0b9863c commit 4630245

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@
4848
],
4949

5050
"require" : {
51-
"php" : "^8.1",
52-
"ext-posix" : "*",
53-
"ext-filter" : "*",
54-
"ext-dom" : "*",
55-
"ext-gd" : "*"
51+
"php" : "^8.1"
5652
},
5753

5854
"require-dev" : {
@@ -66,7 +62,11 @@
6662
"symfony/process" : "For Cli::exec() method only",
6763
"symfony/polyfill-mbstring" : "For UTF-8 if ext-mbstring disabled",
6864
"jbzoo/data" : ">=4.0",
69-
"ext-intl" : "*"
65+
"ext-intl" : "*",
66+
"ext-posix" : "*",
67+
"ext-filter" : "*",
68+
"ext-dom" : "*",
69+
"ext-gd" : "*"
7070
},
7171

7272
"autoload" : {

src/Xml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public static function createFromString(?string $source = null, bool $preserveWh
5050

5151
$document->preserveWhiteSpace = $preserveWhiteSpace;
5252

53-
if (!isStrEmpty($source)) {
54-
$document->loadXML($source ?? '');
53+
if ($source !== '' && $source !== null) {
54+
$document->loadXML($source);
5555
}
5656

5757
$document->xmlVersion = self::VERSION;

0 commit comments

Comments
 (0)