From dba0e81ca271bfb92bda1b2b5c481445e1507fbc Mon Sep 17 00:00:00 2001 From: Giuseppe Mazzapica Date: Mon, 15 May 2017 13:33:53 +0200 Subject: [PATCH] Make compatible with Composer 1.3+ --- src/Unzipper.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Unzipper.php b/src/Unzipper.php index 0424af5..ea28009 100644 --- a/src/Unzipper.php +++ b/src/Unzipper.php @@ -55,9 +55,10 @@ public function unzip($zipPath, $target) * * @param PackageInterface $package * @param string $path + * @param bool $output * @return string|void */ - public function download(PackageInterface $package, $path) + public function download(PackageInterface $package, $path, $output = true) { } @@ -71,11 +72,9 @@ public function download(PackageInterface $package, $path) */ private function checkLibrary($zipPath) { - if (!isset(parent::$hasSystemUnzip)) { - parent::$hasSystemUnzip = (new ExecutableFinder())->find('unzip'); - } + $hasSystemUnzip = (new ExecutableFinder())->find('unzip'); - if (!parent::$hasSystemUnzip && !class_exists('ZipArchive')) { + if (!$hasSystemUnzip && !class_exists('ZipArchive')) { $name = basename($zipPath); throw new \RuntimeException( "Can't unzip '{$name}' because your system does not support unzip."