Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all versions of a pecl package

Tags:

php

pear

pecl

Is it possible to list all versions of a pecl package?

pecl search xdebug, for example, only lists the latest 3.0.1 version. But I'm wanting the latest 2.x version.

like image 817
parleer Avatar asked Dec 21 '20 19:12

parleer


2 Answers

The pear command line installer (which is behind pecl) has no native way of listing all package versions.

You can only query the REST API yourself: https://pear.php.net/rest/r/mime_type/allreleases2.xml

The package name must be lowercase in that URL.

like image 123
cweiske Avatar answered Oct 26 '22 20:10

cweiske


You can use pecl list to list all installed packages, which will return something like:

Installed packages, channel pecl.php.net:
=========================================
Package    Version State
pdo_sqlsrv 5.9.0   stable
redis      5.3.3   stable
sqlsrv     5.9.0   stable

Or, you can use pecl info {package} to list information about a specific package.

So far as I know, you cannot list all available versions directly from command line. Your best bet, is just heading over to pecl.php.net and searching for your package, which will list all package versions, along with their release dates.

like image 20
Crayons Avatar answered Oct 26 '22 22:10

Crayons