}
}
- // sort by the lowest version and return all other sources for the same package
+ // Sort by the highest version and return all other sources for the same package.
$validPackageUpdateIDs = [];
foreach ($possiblePackages as $identifier => $packageSources) {
if (count($packageSources) > 1) {
];
}
+ // Sort packages with the highest version ending up on top.
uasort($packageVersions, function($a, $b) {
- return Package::compareVersion($a['packageVersion'], $b['packageVersion']);
+ return Package::compareVersion($b['packageVersion'], $a['packageVersion']);
});
reset($packageVersions);