From 484d0fb0a582b982ec57aaa756446e586ea09dff Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 5 Dec 2020 20:21:09 +0100 Subject: [PATCH] make dev suffix rank work for uppercase too Hi, I wanted to release a new version after BETA, with name RC, but they were the same. I digged deeper and discoverd the score is incorrectly interpreted for uppercase. - rc -> 3 - RC -> 0 - beta -> 2 - BETA -> 0 --- src/PreReleaseSuffix.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PreReleaseSuffix.php b/src/PreReleaseSuffix.php index 1bcb346..7238b25 100644 --- a/src/PreReleaseSuffix.php +++ b/src/PreReleaseSuffix.php @@ -60,6 +60,8 @@ public function isGreaterThan(PreReleaseSuffix $suffix): bool { * @param $value */ private function mapValueToScore($value): int { + $value = strtolower($value); + if (\array_key_exists($value, self::valueScoreMap)) { return self::valueScoreMap[$value]; }