Add warning if OpenSSL does not support TLSv1.2 or TLSv1.1
parent
c5cb2327cf
commit
3979abc638
|
@ -453,6 +453,10 @@ EOT
|
||||||
$errors['openssl'] = true;
|
$errors['openssl'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extension_loaded('openssl') && OPENSSL_VERSION_NUMBER < 0x1000100f) {
|
||||||
|
$warnings['openssl_version'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
|
if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
|
||||||
$warnings['apc_cli'] = true;
|
$warnings['apc_cli'] = true;
|
||||||
}
|
}
|
||||||
|
@ -570,6 +574,16 @@ EOT
|
||||||
$text .= " Composer works with 5.3.2+ for most people, but there might be edge case issues.";
|
$text .= " Composer works with 5.3.2+ for most people, but there might be edge case issues.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'openssl_version':
|
||||||
|
// Attempt to parse version number out, fallback to whole string value.
|
||||||
|
$opensslVersion = trim(strstr(OPENSSL_VERSION_TEXT, ' '));
|
||||||
|
$opensslVersion = substr($opensslVersion, 0, strpos($opensslVersion, ' '));
|
||||||
|
$opensslVersion = $opensslVersion ? $opensslVersion : OPENSSL_VERSION_TEXT;
|
||||||
|
|
||||||
|
$text = "The OpenSSL library ({$opensslVersion}) used by PHP does not support TLSv1.2 or TLSv1.1.".PHP_EOL;
|
||||||
|
$text .= "If possible you should upgrade OpenSSL to version 1.0.1 or above.";
|
||||||
|
break;
|
||||||
|
|
||||||
case 'xdebug_loaded':
|
case 'xdebug_loaded':
|
||||||
$text = "The xdebug extension is loaded, this can slow down Composer a little.".PHP_EOL;
|
$text = "The xdebug extension is loaded, this can slow down Composer a little.".PHP_EOL;
|
||||||
$text .= " Disabling it when using Composer is recommended.";
|
$text .= " Disabling it when using Composer is recommended.";
|
||||||
|
|
Loading…
Reference in New Issue