public function extractAll(array $requires)
    {
        $flags = array();

        foreach ($requires as $name => $link) {
            $name = strtolower($name);
            $version = $link->getPrettyConstraint();

            $stability = $this->getExplicitStability($version);

            if ($stability === null) {
                $stability = $this->getParsedStability($version);
            }

            $flags[$name] = max($stability, $this->getCurrentStability($name));
        }

        // Filter out null stability values
        return array_filter($flags, function ($v) {
            return $v !== null;
        });
    }