tPl0ch/puppet-composer — pull request #27 by tbal (2014-02-13 16:07:11+00:00)
Title: Add parameter 'php_bin' to override name or path of php binary

In some cases I want (need) to be able to set the php binary (respectively the path of the binary) used for executing composer.

**Case 1)**
Multiple versions of PHP on one environment.

Example:

class { 'composer':
target_dir => '/usr/local/bin',
composer_file => 'composer',
php_bin => '/usr/local/bin/php5',
}

**Case 2)**
If PHP is used with apc.enable_cli=1, it results in an error, see these resources:
https://github.com/composer/composer/issues/264
http://chapter31.com/2013/06/03/php-composer-error-cannot-redeclare-class/

By setting `php_bin=php -d "apc.enable_cli=0"` I can get around the error without globally disabling apc in cli mode.

Example:

class { 'composer':
target_dir => '/usr/local/bin',
composer_file => 'composer',
php_bin => 'php -d "apc.enable_cli=0"',
}