1
0
Fork 0

Merge branch '1.2'

pull/5779/head
Jordi Boggiano 2016-10-10 18:52:20 +02:00
commit 41c3307fc5
1 changed files with 10 additions and 0 deletions

View File

@ -61,6 +61,7 @@ EOT
protected function execute(InputInterface $input, OutputInterface $output)
{
$packages = $input->getArgument('packages');
$packages = array_map('strtolower', $packages);
$file = Factory::getComposerFile();
@ -78,6 +79,15 @@ EOT
$io->writeError('<warning>You are using the deprecated option "update-with-dependencies". This is now default behaviour. The --no-update-with-dependencies option can be used to remove a package without its dependencies.</warning>');
}
// make sure name checks are done case insensitively
foreach (array('require', 'require-dev') as $linkType) {
if (isset($composer[$linkType])) {
foreach ($composer[$linkType] as $name => $version) {
$composer[$linkType][strtolower($name)] = $version;
}
}
}
foreach ($packages as $package) {
if (isset($composer[$type][$package])) {
$json->removeLink($type, $package);