Add uopz warning from installer code (#11988)
parent
ede152bd65
commit
8d90eb694a
|
@ -678,6 +678,12 @@ EOT
|
||||||
$warnings['onedrive'] = PHP_VERSION;
|
$warnings['onedrive'] = PHP_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extension_loaded('uopz')
|
||||||
|
&& !(filter_var(ini_get('uopz.disable'), FILTER_VALIDATE_BOOLEAN)
|
||||||
|
|| filter_var(ini_get('uopz.exit'), FILTER_VALIDATE_BOOLEAN))) {
|
||||||
|
$warnings['uopz'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($errors)) {
|
if (!empty($errors)) {
|
||||||
foreach ($errors as $error => $current) {
|
foreach ($errors as $error => $current) {
|
||||||
switch ($error) {
|
switch ($error) {
|
||||||
|
@ -791,6 +797,11 @@ EOT
|
||||||
$text .= "Upgrade your PHP ({$current}) to use this location with Composer.".PHP_EOL;
|
$text .= "Upgrade your PHP ({$current}) to use this location with Composer.".PHP_EOL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'uopz':
|
||||||
|
$text = "The uopz extension ignores exit calls and may not work with all Composer commands.".PHP_EOL;
|
||||||
|
$text .= "Disabling it when using Composer is recommended.";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new \InvalidArgumentException(sprintf("DiagnoseCommand: Unknown warning type \"%s\". Please report at https://github.com/composer/composer/issues/new.", $warning));
|
throw new \InvalidArgumentException(sprintf("DiagnoseCommand: Unknown warning type \"%s\". Please report at https://github.com/composer/composer/issues/new.", $warning));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue