How to list all versions of a pecl package
Asked Answered
N

2

17

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.

Niall answered 21/12, 2020 at 19:49 Comment(0)
B
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.

Bail answered 19/2, 2021 at 17:55 Comment(0)
L
4

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.

Leninism answered 19/7, 2021 at 8:37 Comment(1)
He's not wrong. pecl.php.net/rest/r/mcrypt/allreleases.xml and pecl.php.net/rest/r/xdebug/allreleases.xml worked for meTurpitude

© 2022 - 2024 — McMap. All rights reserved.