From f567fd69eb3fd5346b65f39d498bf1986e04a959 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 18 Nov 2020 22:25:25 +0100 Subject: [PATCH] List both unzip and zip ext presence in diagnose --- src/Composer/Command/DiagnoseCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 1a700a93a..2385053e1 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -29,6 +29,7 @@ use Composer\SelfUpdate\Versions; use Composer\IO\NullIO; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Process\ExecutableFinder; /** * @author Jordi Boggiano @@ -170,7 +171,13 @@ EOT $io->write('OpenSSL version: ' . (defined('OPENSSL_VERSION_TEXT') ? ''.OPENSSL_VERSION_TEXT.'' : 'missing')); $io->write('cURL version: ' . $this->getCurlVersion()); - $io->write('zip extension: ' . (extension_loaded('zip') ? 'OK' : 'not loaded')); + + $finder = new ExecutableFinder; + $hasSystemUnzip = (bool) $finder->find('unzip'); + $io->write( + 'zip: ' . (extension_loaded('zip') ? 'extension present' : 'extension not loaded') + . ', ' . ($hasSystemUnzip ? 'unzip present' : 'unzip not available') + ); return $this->exitCode; }