support packages that have been pickle'd
authorMichael Wallner <mike@php.net>
Sat, 21 Mar 2015 14:56:05 +0000 (15:56 +0100)
committerMichael Wallner <mike@php.net>
Sat, 21 Mar 2015 14:56:05 +0000 (15:56 +0100)
bin/pharext
src/pharext/SourceDir/Pecl.php

index 1c9fdea865b157fe467168f3c9a09b8f3fb780cd..75084747467458d4e9934f105792dd0c8494cbdb 100755 (executable)
Binary files a/bin/pharext and b/bin/pharext differ
index 39127f6a7f95035e599e136ef3d135362abe94ad..d21a0e0de313a5155a48bb88424ef377dea80769 100644 (file)
@@ -33,10 +33,13 @@ class Pecl implements \IteratorAggregate, SourceDir
         * @see \pharext\SourceDir::__construct()
         */
        public function __construct(Command $cmd, $path) {
-               if (!realpath("$path/package.xml")) {
+               if (realpath("$path/package2.xml")) {
+                       $sxe = simplexml_load_file("$path/package2.xml");
+               } elseif (realpath("$path/package.xml")) {
+                       $sxe = simplexml_load_file("$path/package.xml");
+               } else {
                        throw new \Exception("Missing package.xml in $path");
                }
-               $sxe = simplexml_load_file("$path/package.xml");
                $sxe->registerXPathNamespace("pecl", $sxe->getDocNamespaces()[""]);
                
                $args = $cmd->getArgs();