1
0
Fork 0

Add curl/zip ext info to diagnose command

pull/9286/head
Jordi Boggiano 2020-10-14 13:29:41 +02:00
parent 3fe0ae0442
commit 34dd9e19e1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 15 additions and 0 deletions

View File

@ -173,6 +173,8 @@ EOT
} }
$io->write('OpenSSL version: ' . (defined('OPENSSL_VERSION_TEXT') ? '<comment>'.OPENSSL_VERSION_TEXT.'</comment>' : '<error>missing</error>')); $io->write('OpenSSL version: ' . (defined('OPENSSL_VERSION_TEXT') ? '<comment>'.OPENSSL_VERSION_TEXT.'</comment>' : '<error>missing</error>'));
$io->write('cURL version: ' . $this->getCurlVersion());
$io->write('zip extension: ' . (extension_loaded('zip') ? '<info>OK</info>' : '<info>not loaded</info>'));
return $this->exitCode; return $this->exitCode;
} }
@ -444,6 +446,19 @@ EOT
return true; return true;
} }
private function getCurlVersion()
{
if (function_exists('curl_version')) {
$version = curl_version();
return '<comment>'.$version['version'].'</comment> '.
'libz <comment>'.(isset($version['libz_version']) ? $version['libz_version'] : 'missing').'</comment> '.
'ssl <comment>'.(isset($version['ssl_version']) ? $version['ssl_version'] : 'missing').'</comment>';
}
return '<error>missing, using php streams fallback</error>';
}
/** /**
* @param bool|string|\Exception $result * @param bool|string|\Exception $result
*/ */