Skip to content

Commit bc664a4

Browse files
committed
Fix reading namespace in package.xml
1 parent 684ac4a commit bc664a4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

extension-matrix/src/semver/app.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
} else if($file === 'package.xml') {
1717
$package_xml = $argv[2];
1818
$xml = simplexml_load_file($package_xml);
19-
$xml->registerXPathNamespace("p", "http://pear.php.net/dtd/package-2.0");
19+
$namespace = $xml->getNamespaces()[""] ?? "http://pear.php.net/dtd/package-2.0";
20+
$xml->registerXPathNamespace("p", $namespace);
2021
$min = $xml->xpath("//p:php/p:min")[0] ?? null;
2122
$max = $xml->xpath("//p:php/p:max")[0] ?? null;
2223
$constraint = '';
21 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)