From 95abd7a0a7f85c1eb3fa4d6c50056543c64bbe0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pluchino?= Date: Wed, 15 Feb 2017 11:06:53 +0100 Subject: [PATCH] Fix the cleaning of the version prefix --- Converter/SemverConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Converter/SemverConverter.php b/Converter/SemverConverter.php index be1cf1f6..4cb4b0ae 100644 --- a/Converter/SemverConverter.php +++ b/Converter/SemverConverter.php @@ -28,7 +28,7 @@ public function convertVersion($version) } $version = str_replace('–', '-', $version); - $prefix = preg_match('/^[a-z]/', $version) ? substr($version, 0, 1) : ''; + $prefix = preg_match('/^[a-z]/', $version) && 0 !== strpos($version, 'dev-') ? substr($version, 0, 1) : ''; $version = substr($version, strlen($prefix)); $version = SemverUtil::convertVersionMetadata($version); $version = SemverUtil::convertDateVersion($version);