diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index add683faf..e92994a46 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -65,6 +65,7 @@ class InstallCommand // TODO there should be an update flag or dedicated update command // TODO check lock file to remove packages that disappeared from the requirements foreach ($config['require'] as $name => $version) { + $name = $this->lowercase($name); if ('latest' === $version) { $request->install($name); } else { @@ -157,4 +158,12 @@ class InstallCommand file_put_contents('composer.lock', json_encode($content, JSON_FORCE_OBJECT)."\n"); echo '> composer.lock dumped'.PHP_EOL; } + + protected function lowercase($str) + { + if (function_exists('mb_strtolower')) { + return mb_strtolower($str, 'UTF-8'); + } + return strtolower($str, 'UTF-8'); + } } \ No newline at end of file