Skip to content

Commit

Permalink
Make compatible with Composer 1.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed May 15, 2017
1 parent d334ab2 commit dba0e81
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Unzipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}

Expand All @@ -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."
Expand Down

0 comments on commit dba0e81

Please sign in to comment.