diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 26b3b8387..9e4f8863d 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -369,10 +369,6 @@ EOT $errors['hash'] = true; } - if (!extension_loaded('ctype')) { - $errors['ctype'] = true; - } - if (!ini_get('allow_url_fopen')) { $errors['allow_url_fopen'] = true; } @@ -441,11 +437,6 @@ EOT $text .= "Install it or recompile php without --disable-hash"; break; - case 'ctype': - $text = PHP_EOL."The ctype extension is missing.".PHP_EOL; - $text .= "Install it or recompile php without --disable-ctype"; - 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; diff --git a/src/Composer/Package/Loader/ArrayLoader.php b/src/Composer/Package/Loader/ArrayLoader.php index 8e210375d..60cff3b33 100644 --- a/src/Composer/Package/Loader/ArrayLoader.php +++ b/src/Composer/Package/Loader/ArrayLoader.php @@ -147,7 +147,7 @@ class ArrayLoader implements LoaderInterface } if (!empty($config['time'])) { - $time = ctype_digit($config['time']) ? '@'.$config['time'] : $config['time']; + $time = preg_match('/^\d+$/D', $config['time']) ? '@'.$config['time'] : $config['time']; try { $date = new \DateTime($time, new \DateTimeZone('UTC'));