From 91de94b9a3519577be6fe91868e52e4bc635c90d Mon Sep 17 00:00:00 2001 From: Brett Bieber Date: Mon, 7 Mar 2011 15:05:12 -0600 Subject: [PATCH] When adding $extrafiles, support any object that implements the PackageInterface. --- src/PEAR2/Pyrus/Developer/PackageFile/Commands.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PEAR2/Pyrus/Developer/PackageFile/Commands.php b/src/PEAR2/Pyrus/Developer/PackageFile/Commands.php index 27598f6..0d2f11e 100644 --- a/src/PEAR2/Pyrus/Developer/PackageFile/Commands.php +++ b/src/PEAR2/Pyrus/Developer/PackageFile/Commands.php @@ -344,11 +344,12 @@ function package($frontend, $args, $options) } foreach ($extrafiles as $path => $file) { if (is_object($file)) { - if ($file instanceof \PEAR2\Pyrus\Package) { + if ($file instanceof \PEAR2\Pyrus\PackageInterface + || $file instanceof \PEAR2\Pyrus\PackageFileInterface) { continue; } throw new \PEAR2\Pyrus\Developer\Creator\Exception( - 'extrasetup file object must be a \PEAR2\Pyrus\Package object'); + 'extrasetup file object must implement \PEAR2\Pyrus\PackageInterface or \PEAR2\Pyrus\PackageFileInterface'); } if (!file_exists($file)) { throw new \PEAR2\Pyrus\Developer\Creator\Exception(