1
0
Fork 0

Fix constraint parsing bug in outdated, fixes #5251

pull/5267/head
Jordi Boggiano 2016-04-28 22:25:53 +01:00
parent 4f2ae0a1d9
commit 2a3b56e82c
1 changed files with 5 additions and 1 deletions

View File

@ -385,7 +385,11 @@ EOT
return 'info'; return 'info';
} }
if ($latestPackage->getVersion() && Semver::satisfies($latestPackage->getVersion(), '^'.$package->getVersion())) { $constraint = $package->getVersion();
if (0 !== strpos($constraint, 'dev-')) {
$constraint = '^'.$constraint;
}
if ($latestPackage->getVersion() && Semver::satisfies($latestPackage->getVersion(), $constraint)) {
// print red as it needs an immediate semver-compliant upgrade // print red as it needs an immediate semver-compliant upgrade
return 'highlight'; return 'highlight';
} }