Service/VersionManager.php
public function getVersionFromProvider()
    {
        $provider = $this->getActiveProvider();

        try {
            $versionString = $provider->getVersion();
            if (substr(strtolower($versionString), 0, 1) == 'v') {
                $versionString = substr($versionString, 1);
            }

            $version = Version::fromString($versionString);
            if ($this->formatter instanceof FormatterInterface) {
                $version = $this->formatter->format($version);
            }

            return $version;
        } catch (InvalidVersionStringException $e) {
            throw new RuntimeException(get_class($provider) . ' returned an invalid version');
        }
    }
public function getVersionFromProvider()
    {
        $provider = $this->getActiveProvider();

        try {
            $versionString = $provider->getVersion();
            if (substr(strtolower($versionString), 0, 1) == 'v') {
                $versionString = substr($versionString, 1);
            }

            $version = Version::fromString($versionString);
            if ($this->formatter instanceof FormatterInterface) {
                $version = $this->formatter->format($version);
            }

            return $version;
        } catch (InvalidVersionStringException $e) {
            throw new RuntimeException(get_class($provider) . ' returned an invalid version');
        }
    }
public function getVersionFromProvider ( ) { $ provider = $ this -> getActiveProvider ( ) ; try { $ versionString = $ provider -> getVersion ( ) ; if ( substr ( strtolower ( $ versionString ) , 0 , 1 ) == 'v' ) { $ versionString = substr ( $ versionString , 1 ) ; } $ version = Version :: fromString ( $ versionString ) ; if ( $ this -> formatter instanceof FormatterInterface ) { $ version = $ this -> formatter -> format ( $ version ) ; } return $ version ; } catch ( InvalidVersionStringException $ e ) { throw new RuntimeException ( get_class ( $ provider ) . ' returned an invalid version' ) ; } }
Get the version from the active provider

@return Version
@throws RuntimeException
Get the version from the active provider