Skip to content

Commit

Permalink
make dev suffix rank work for uppercase too
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TomasVotruba authored and theseer committed Dec 11, 2020
1 parent 726c026 commit 484d0fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PreReleaseSuffix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 484d0fb

Please sign in to comment.