src/Composer/Repository/Pear/ChannelRest10Reader.php
private function readPackageReleases($baseUrl, $packageName)
    {
        $result = array();

        try {
            $xmlPath = '/r/' . strtolower($packageName) . '/allreleases.xml';
            $xml = $this->requestXml($baseUrl, $xmlPath);
            $xml->registerXPathNamespace('ns', self::ALL_RELEASES_NS);
            foreach ($xml->xpath('ns:r') as $node) {
                $releaseVersion = (string) $node->v;
                $releaseStability = (string) $node->s;

                try {
                    $result[$releaseVersion] = new ReleaseInfo(
                        $releaseStability,
                        $this->readPackageReleaseDependencies($baseUrl, $packageName, $releaseVersion)
                    );
                } catch (TransportException $exception) {
                    if ($exception->getCode() != 404) {
                        throw $exception;
                    }
                }
            }
        } catch (TransportException $exception) {
            if ($exception->getCode() != 404) {
                throw $exception;
            }
        }

        return $result;
    }
private function readPackageReleases($baseUrl, $packageName)
    {
        $result = array();

        try {
            $xmlPath = '/r/' . strtolower($packageName) . '/allreleases.xml';
            $xml = $this->requestXml($baseUrl, $xmlPath);
            $xml->registerXPathNamespace('ns', self::ALL_RELEASES_NS);
            foreach ($xml->xpath('ns:r') as $node) {
                $releaseVersion = (string) $node->v;
                $releaseStability = (string) $node->s;

                try {
                    $result[$releaseVersion] = new ReleaseInfo(
                        $releaseStability,
                        $this->readPackageReleaseDependencies($baseUrl, $packageName, $releaseVersion)
                    );
                } catch (TransportException $exception) {
                    if ($exception->getCode() != 404) {
                        throw $exception;
                    }
                }
            }
        } catch (TransportException $exception) {
            if ($exception->getCode() != 404) {
                throw $exception;
            }
        }

        return $result;
    }
private function readPackageReleases ( $ baseUrl , $ packageName ) { $ result = array ( ) ; try { $ xmlPath = '/r/' . strtolower ( $ packageName ) . '/allreleases.xml' ; $ xml = $ this -> requestXml ( $ baseUrl , $ xmlPath ) ; $ xml -> registerXPathNamespace ( 'ns' , self :: ALL_RELEASES_NS ) ; foreach ( $ xml -> xpath ( 'ns:r' ) as $ node ) { $ releaseVersion = ( string ) $ node -> v ; $ releaseStability = ( string ) $ node -> s ; try { $ result [ $ releaseVersion ] = new ReleaseInfo ( $ releaseStability , $ this -> readPackageReleaseDependencies ( $ baseUrl , $ packageName , $ releaseVersion ) ) ; } catch ( TransportException $ exception ) { if ( $ exception -> getCode ( ) != 404 ) { throw $ exception ; } } } } catch ( TransportException $ exception ) { if ( $ exception -> getCode ( ) != 404 ) { throw $ exception ; } } return $ result ; }
Read package releases from
{baseUrl}/p/{package}/allreleases.xml

@param string $baseUrl
@param string $packageName
@throws \Composer\Downloader\TransportException|\Exception
@return ReleaseInfo[]                                      hash array with keys as version numbers
Read package releases from { baseUrl } / p / { package } / allreleases . xml