diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 2b1927f6b..87ba2cc0e 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -433,6 +433,10 @@ EOT $errors['hash'] = true; } + if (!extension_loaded('iconv') && !extension_loaded('mbstring')) { + $errors['iconv_mbstring'] = true; + } + if (!ini_get('allow_url_fopen')) { $errors['allow_url_fopen'] = true; } @@ -505,6 +509,11 @@ EOT $text .= "Install it or recompile php without --disable-hash"; break; + case 'iconv_mbstring': + $text = PHP_EOL."The iconv OR mbstring extension is required and both are missing.".PHP_EOL; + $text .= "Install either of them or recompile php without --disable-iconv"; + break; + case 'unicode': $text = PHP_EOL."The detect_unicode setting must be disabled.".PHP_EOL; $text .= "Add the following to the end of your `php.ini`:".PHP_EOL;