From: Michael Wallner Date: Sat, 21 Mar 2015 14:56:05 +0000 (+0100) Subject: support packages that have been pickle'd X-Git-Tag: v3.0.0~25 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=13b5b8aa4efa126f7e34943b42011f43e09bbde9;p=pharext%2Fpharext support packages that have been pickle'd --- diff --git a/bin/pharext b/bin/pharext index 1c9fdea..7508474 100755 Binary files a/bin/pharext and b/bin/pharext differ diff --git a/src/pharext/SourceDir/Pecl.php b/src/pharext/SourceDir/Pecl.php index 39127f6..d21a0e0 100644 --- a/src/pharext/SourceDir/Pecl.php +++ b/src/pharext/SourceDir/Pecl.php @@ -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();