public function getSortedProductionVersions($descending = false)
    {
        $versions = [];
        foreach ($this->getVersions() as $v) {
            if (strpos($v->getVersion(), Package\Version::DEV_PREFIX) !== 0) {
                $versions[] = $v;
            }
        }
        usort($versions, function (Package\Version $a, Package\Version $b) use ($descending) {
            return version_compare($a->getVersion(), $b->getVersion()) * ($descending ? -1 : 1);
        });

        return $versions;
    }