1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Preserved original position of package if required packages are before this

This commit is contained in:
Martin Hasoň 2012-10-17 10:50:53 +02:00
parent e75abcbb41
commit c63f0d9642
3 changed files with 20 additions and 0 deletions

View file

@ -459,6 +459,11 @@ FOOTER;
$packageKey = $names[$item[0]->getName()];
$target = $link->getTarget();
$targetKey = is_int($names[$target]) ? $names[$target] : $names[$names[$target]];
if ($targetKey <= $packageKey) {
continue;
}
$groups[$targetKey] = array_merge($groups[$targetKey], $groups[$packageKey]);
foreach ($groups[$packageKey] as $originalItem) {