public function getProjectVersionsAction($vendor, $project)
    {
        $this->checkUninstalled();

        $url     = sprintf('https://packagist.org/packages/%s/%s.json', $vendor, $project);
        $rfs     = new RemoteFilesystem($this->getInputOutput());
        $results = $rfs->getContents($url, $url);
        $data    = new JsonArray($results);

        $versions = [];

        foreach ($data->get('package/versions') as $information) {
            $version = [
                'name'               => $information['name'],
                'version'            => $information['version'],
                'version_normalized' => $information['version_normalized'],
            ];

            $normalized = $information['version'];
            if ('dev-' === substr($normalized, 0, 4)) {
                if (isset($information['extra']['branch-alias'][$normalized])) {
                    $version['version_normalized'] = $information['extra']['branch-alias'][$normalized];
                }
            }

            if (isset($information['source']['reference'])) {
                $version['reference'] = $information['source']['reference'];
            } elseif (isset($information['dist']['reference'])) {
                $version['reference'] = $information['dist']['reference'];
            }

            $versions[] = $version;
        }

        return new JsonResponse(
            [
                'status' => 'OK',
                'versions' => $versions
            ]
        );
    }