diff --git a/src/VersionsCheck.php b/src/VersionsCheck.php index 8d56142..858fb99 100644 --- a/src/VersionsCheck.php +++ b/src/VersionsCheck.php @@ -50,7 +50,7 @@ public function checkPackages(ArrayRepository $distRepository, WritableRepositor if (\count($higherPackages) > 0) { // Sort packages by highest version to lowest usort($higherPackages, function (PackageInterface $p1, PackageInterface $p2) { - return Comparator::compare($p1->getVersion(), '<', $p2->getVersion()); + return Comparator::compare($p1->getVersion(), '<', $p2->getVersion()) ? 1 : -1; }); // Push actual and last package on outdated array