1
0
Fork 0

Fix case insensitivity of remove command, fixes #5973

pull/5979/head
Jordi Boggiano 2016-12-18 12:47:33 +01:00
parent d735524eb1
commit 01885777f3
1 changed files with 4 additions and 4 deletions

View File

@ -84,19 +84,19 @@ EOT
foreach (array('require', 'require-dev') as $linkType) {
if (isset($composer[$linkType])) {
foreach ($composer[$linkType] as $name => $version) {
$composer[$linkType][strtolower($name)] = $version;
$composer[$linkType][strtolower($name)] = $name;
}
}
}
foreach ($packages as $package) {
if (isset($composer[$type][$package])) {
$json->removeLink($type, $package);
$json->removeLink($type, $composer[$type][$package]);
} elseif (isset($composer[$altType][$package])) {
$io->writeError('<warning>'.$package.' could not be found in '.$type.' but it is present in '.$altType.'</warning>');
$io->writeError('<warning>'.$composer[$altType][$package].' could not be found in '.$type.' but it is present in '.$altType.'</warning>');
if ($io->isInteractive()) {
if ($io->askConfirmation('Do you want to remove it from '.$altType.' [<comment>yes</comment>]? ', true)) {
$json->removeLink($altType, $package);
$json->removeLink($altType, $composer[$altType][$package]);
}
}
} else {