opscode-cookbooks/php — pull request #56 by benclark (2014-01-31 01:36:04+00:00)
Title: Pear provider incorrectly considers all packages as PECL

It looks like the pecl? method was modified in this commit: https://github.com/opscode-cookbooks/php/commit/7c336b0bbfaf5806a783ba3524053f27116f6cc1. The refactoring changed the logic flow so that all packages are incorrectly searched for with PECL — even if they were found with Pear — and then, later, the package install action fails because PECL can't install it.

I'm offering this pull request that moves the `if grep_for_version(pecl)` inside the `if grep_for_version(pear).nil?` condition, so that it only searches PECL if/when Pear search fails.