private function fixupRawTag($rawValue)
    {
        if (0 === strpos($rawValue, 'v')) {
            $rawValue = substr($rawValue, 1);
        }
        // WHY NOT SCRUB OUT PLUS SIGNS, RIGHT?
        $foundIt = strpos($rawValue, '+');
        if (false !== $foundIt) {
            $rawValue = substr($rawValue, 0, $foundIt);
        }
        $rawValue = strtr($rawValue, ['.alpha' => '-alpha', '.beta' => '-beta', '.dev' => '-dev']);
        $pieces = explode('.', $rawValue);
        $count = count($pieces);
        if (0 == $count) {
            $pieces[] = '0';
            $count = 1;
        }
        for ($add = $count; $add < 3; ++$add) {
            $pieces[] = '0';
        }
        $return = implode('.', array_slice($pieces, 0, 3));

        return $return;
    }
private function fixupRawTag($rawValue)
    {
        if (0 === strpos($rawValue, 'v')) {
            $rawValue = substr($rawValue, 1);
        }
        // WHY NOT SCRUB OUT PLUS SIGNS, RIGHT?
        $foundIt = strpos($rawValue, '+');
        if (false !== $foundIt) {
            $rawValue = substr($rawValue, 0, $foundIt);
        }
        $rawValue = strtr($rawValue, ['.alpha' => '-alpha', '.beta' => '-beta', '.dev' => '-dev']);
        $pieces = explode('.', $rawValue);
        $count = count($pieces);
        if (0 == $count) {
            $pieces[] = '0';
            $count = 1;
        }
        for ($add = $count; $add < 3; ++$add) {
            $pieces[] = '0';
        }
        $return = implode('.', array_slice($pieces, 0, 3));

        return $return;
    }
private function fixupRawTag ( $ rawValue ) { if ( 0 === strpos ( $ rawValue , 'v' ) ) { $ rawValue = substr ( $ rawValue , 1 ) ; } // WHY NOT SCRUB OUT PLUS SIGNS, RIGHT? $ foundIt = strpos ( $ rawValue , '+' ) ; if ( false !== $ foundIt ) { $ rawValue = substr ( $ rawValue , 0 , $ foundIt ) ; } $ rawValue = strtr ( $ rawValue , [ '.alpha' => '-alpha' , '.beta' => '-beta' , '.dev' => '-dev' ] ) ; $ pieces = explode ( '.' , $ rawValue ) ; $ count = count ( $ pieces ) ; if ( 0 == $ count ) { $ pieces [ ] = '0' ; $ count = 1 ; } for ( $ add = $ count ; $ add < 3 ; ++ $ add ) { $ pieces [ ] = '0' ; } $ return = implode ( '.' , array_slice ( $ pieces , 0 , 3 ) ) ; return $ return ; }
Why do we have to do this? Your guess is as good as mine.
The only flaw I've seen in the semver lib we're using,
and the regex's in there are too complicated to mess with.

@param string $rawValue

@return string
Why do we have to do this? Your guess is as good as mine . The only flaw I ve seen in the semver lib we re using and the regex s in there are too complicated to mess with .