16

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.

parleer
  • 1,220
  • 3
  • 12
  • 22

3 Answers3

4

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.

Crayons
  • 1,906
  • 1
  • 14
  • 35
3

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.

cweiske
  • 30,033
  • 14
  • 133
  • 194
  • 3
    He's not wrong. https://pecl.php.net/rest/r/mcrypt/allreleases.xml and https://pecl.php.net/rest/r/xdebug/allreleases.xml worked for me – sibaz Oct 12 '21 at 21:09
-1

You can try this:

pecl install xdebug-2.9.8
Red
  • 88
  • 4