Fix constraint parsing bug in outdated, fixes #5251
parent
4f2ae0a1d9
commit
2a3b56e82c
|
@ -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';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue