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');
        }
    }