protected function parse($semverFile)
    {

        // load the content of the semver file
        $output = file_get_contents($semverFile);

        // initialize the array with the matches
        $matches = array();

        // extract the version information
        if (!preg_match_all(self::REGEX, $output, $matches)) {
            throw new \Exception($this, 'Bad semver file.');
        }

        // prepare and return the version number
        list(, $major, $minor, $patch, $special, $metadata) = array_map('current', $matches);
        return compact('major', 'minor', 'patch', 'special', 'metadata');
    }