c9s/phpbrew — pull request #242 by GM-Alex (2014-06-01 15:55:23+00:00)
Title: Add comfort functionality and make phpbrew more configurable

This pull request contains the following changes

* Add yaml file for configuration
* Add custom virtual variants feature
* Add presets of extensions
* Add feature to install a extension for a php version without switching the php version

# yaml configuration file

The yaml configuration file can be set by using the following command: _phpbrew init --cf=config.yaml_ or alternatively _phpbrew init --configFile=config.yaml_

```yaml
virtualVariants:
dev:
bcmath:
bz2:
calendar:
cli:
ctype:
dom:
fileinfo:
filter:
ipc:
json:
mbregex:
mbstring:
mhash:
mcrypt:
gd:
- --with-libdir=lib/x86_64-linux-gnu
- --with-gd=shared
- --enable-gd-natf
- --with-jpeg-dir=/usr
- --with-png-dir=/usr
extensions:
dev:
xhprof: latest
xdebug: stable
```

# custom virtual variants feature

The virtual variants are defined in the config file (see _virtualVariants_ in the config example above) and can overwrite the default configuration of the features (see _gd_ in the config example above), these config is only used if you call the custom virtual variant.

# presets of extensions

Similar to the virtual variants you can define virtual extensions (see _extenions_ in the config example above). You can set also the version of the module.

The can be called by using the following command: _phpbrew ext install +dev_

# install extension for php version

To install a extension for an other php version than the current active you can run now the following command: _phpbrew ext install --pv 5.3 +dev_ or alternatively _phpbrew ext install --phpVersion 5.3 +dev_