private static function toSemVer($v1) { $shortVersionMatcher = "/^(\\d\\.\\d)(-.*)?\$/"; $matches = Strings::match($v1, $shortVersionMatcher); if ($matches) { return $matches[1] . ".0" . (isset($matches[2]) ? $matches[2] : ""); } return $v1; }