diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php
index f0bab63a7..415b6d7b2 100644
--- a/src/Composer/Command/DiagnoseCommand.php
+++ b/src/Composer/Command/DiagnoseCommand.php
@@ -177,12 +177,18 @@ EOT
$finder = new ExecutableFinder;
$hasSystemUnzip = (bool) $finder->find('unzip');
- $hasSystem7zip = (bool) $finder->find('7z', null, array('C:\Program Files\7-Zip'));
+ $bin7zip = '';
+ if ($hasSystem7zip = (bool) $finder->find('7z', null, array('C:\Program Files\7-Zip'))) {
+ $bin7zip = '7z';
+ }
+ if (!Platform::isWindows() && !$hasSystem7zip && $hasSystem7zip = (bool) $finder->find('7zz')) {
+ $bin7zip = '7zz';
+ }
$io->write(
'zip: ' . (extension_loaded('zip') ? 'extension present' : 'extension not loaded')
. ', ' . ($hasSystemUnzip ? 'unzip present' : 'unzip not available')
- . ', ' . ($hasSystem7zip ? '7-Zip present' : '7-Zip not available')
+ . ', ' . ($hasSystem7zip ? '7-Zip present ('.$bin7zip.')' : '7-Zip not available')
);
return $this->exitCode;
diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php
index fd0b93a4a..06f33347c 100644
--- a/src/Composer/Downloader/ZipDownloader.php
+++ b/src/Composer/Downloader/ZipDownloader.php
@@ -49,6 +49,9 @@ class ZipDownloader extends ArchiveDownloader
if (!Platform::isWindows() && ($cmd = $finder->find('7z'))) { // 7z linux/macOS support is only used if unzip is not present
self::$unzipCommands[] = array('7z', ProcessExecutor::escape($cmd).' x -bb0 -y %s -o%s');
}
+ if (!Platform::isWindows() && ($cmd = $finder->find('7zz'))) { // 7zz linux/macOS support is only used if unzip is not present
+ self::$unzipCommands[] = array('7zz', ProcessExecutor::escape($cmd).' x -bb0 -y %s -o%s');
+ }
}
if (null === self::$hasZipArchive) {