The "php_pear" helper doesn't work if you specify the version of a pear package.
It seems that the regexp used to parse "pear search" output is wrong
But the output is something like:
We also need to consider the case where the package in not installed:
How to reproduce the bug:
The PECL regexp seems correct:
A simple patch would be removing the version from the regexp for PEAR,
otherwise, it will not work when you specify an older versions of the
package, because it will not be displayed.
Sadly, I don't have the chance of test it on older PHP version (maybe the PEAR output is just changed in a recent version), but it seems that this
part of PEAR is untouched from some time now: https://github.com/pear/pear-core/blob/master/PEAR/Command/Remote.php
I will submit a Pull Request on Github soon.
EDIT: Removed referenced PR from description to reduce risk of confusion, as #40 will be used instead of #33
OS: Ubuntu 12.04 LTS
$ chef-solo -v
$ php -v
PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:34:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies