if (!self::$hasZipArchive && !self::$hasSystemUnzip) {
if (!self::$hasZipArchive && !self::$unzipCommands) {
// php.ini path is added to the error message to help users find the correct file
$iniMessage = IniHelper::getMessage();
$error = "The zip extension and unzip command are both missing, skipping.\n" . $iniMessage;
@ -57,7 +64,7 @@ class ZipDownloader extends ArchiveDownloader
if (null === self::$isWindows) {
self::$isWindows = Platform::isWindows();
if (!self::$isWindows && !self::$hasSystemUnzip) {
if (!self::$isWindows && !self::$unzipCommands) {
$this->io->writeError("<warning>As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.</warning>");
$this->io->writeError("<warning>This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.</warning>");
$this->io->writeError("<warning>Installing 'unzip' may remediate them.</warning>");
@ -82,7 +89,7 @@ class ZipDownloader extends ArchiveDownloader
$isLastChance = true;
}
if (!self::$hasSystemUnzip&& !$isLastChance) {
if (!self::$unzipCommands&& !$isLastChance) {
// This was call as the favorite extract way, but is not available
throw new \RuntimeException('Aborting an attempted deletion of '.$directory.', this was probably not intended, if it is a real use case please report it.');