summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--class/Parser.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/class/Parser.php b/class/Parser.php
index 3ef11a4..ca00ac8 100644
--- a/class/Parser.php
+++ b/class/Parser.php
@@ -278,8 +278,6 @@ class Parser
}
}
self::log("Write $tot packages");
- } else {
- self::log("Bad primary.xml");
}
return $tot;
}
@@ -337,16 +335,21 @@ class Parser
// Parse the provides
foreach ($fmt as $fmt2) {
$prov = $fmt2->attributes()['name'];
- if (preg_match('/^php-composer\((.*)\)$/', $prov, $reg)) {
- list($vend, $proj) = explode('/', $reg[1], 2);
+ if (preg_match('/^php-(composer|pie)\((.*)\)$/', $prov, $reg)) {
+ $type = $reg[1];
+ $name = $reg[2];
+ if (!strpos($name, '/')) {
+ continue;
+ }
+ list($vend, $proj) = explode('/', $name, 2);
if ($vend == 'zendframework') {
if (!$composer) { // only if empty to keep laminas
- $composer = $reg[1];
+ $composer = $name;
}
} else if (substr($reg[1], 0, 4) != 'ext-'
- && substr($reg[1], -15) != '-implementation'
+ && substr($name, -15) != '-implementation'
&& !in_array($reg[1], $excl)) {
- $composer = $reg[1];
+ $composer = $name;
}
}
}