Made the order of aliases deterministic in the locker
parent
4c75a2db01
commit
398a3ac0dc
|
@ -234,7 +234,17 @@ class Locker
|
|||
}
|
||||
|
||||
usort($locked, function ($a, $b) {
|
||||
return strcmp($a['package'], $b['package']);
|
||||
$comparison = strcmp($a['package'], $b['package']);
|
||||
|
||||
if (0 !== $comparison) {
|
||||
return $comparison;
|
||||
}
|
||||
|
||||
// If it is the same package, compare the versions to make the order deterministic
|
||||
$aVersion = isset($a['alias-version']) ? $a['alias-version'] : $a['version'];
|
||||
$bVersion = isset($b['alias-version']) ? $b['alias-version'] : $b['version'];
|
||||
|
||||
return strcmp($aVersion, $bVersion);
|
||||
});
|
||||
|
||||
return $locked;
|
||||
|
|
Loading…
Reference in New Issue