Downgrading a PECL Module
Join the DZone community and get the full member experience.
Join For FreeRecently I saw some weirdness in an existing application when I upgraded a PECL module that the application depended on. To figure out if that really was the problem, I wanted to downgrade
the module to its previous version. There is no opposite command to
"upgrade" but you can instruct pecl to install a specific version of a
module, using the -f switch to force pecl to overwrite newer modules.
For me the problems were caused in the switch between default functionality in pecl_oauth 1.1.0 (this isn't a bug, but is correct behaviour according to the OAuth 1 spec, I just had code that expected the old functionality), so I wanted to put my version back to 1.0.0
pecl install -f oauth-1.0.0
It was easy once I stopped looking for an option called "downgrade" or something like that :) In fact you can use this trick to install all kinds of pecl versions, simply refer to the package as [package name]-[version]. By default pecl won't let you install packages that aren't marked "stable", but you can install beta packages by putting "beta" in place of [version].
Hopefully now I've written this I'll remember next time how to do it!
Downgrading Pecl_OAuth
For me the problems were caused in the switch between default functionality in pecl_oauth 1.1.0 (this isn't a bug, but is correct behaviour according to the OAuth 1 spec, I just had code that expected the old functionality), so I wanted to put my version back to 1.0.0
pecl install -f oauth-1.0.0
It was easy once I stopped looking for an option called "downgrade" or something like that :) In fact you can use this trick to install all kinds of pecl versions, simply refer to the package as [package name]-[version]. By default pecl won't let you install packages that aren't marked "stable", but you can install beta packages by putting "beta" in place of [version].
Hopefully now I've written this I'll remember next time how to do it!
application
security
BETA (programming language)
Command (computing)
authentication
Published at DZone with permission of Lorna Mitchell, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments