josegonzalez/homebrew-php — pull request #982 by greenantdotcom (2014-02-02 19:06:43+00:00)
Title: PHP 5.6 support

With the release of PHP 5.6a1, I thought it would be best to start using/testing with it by moving support into `homebrew` for usage/testing instead of compiling it by hand and using my own hand-compiled version.

As such, I copied all `php55*` modules into a `php56` counterpart. For any of the modules that have version'd dependencies, such as `php56-couchbase.rb`:

depends_on 'php56-igbinary' if build.include?('with-igbinary')

...and change to reference the new version.

--

Further, many of the modules seems to have the same data over and over again. There packages all had hardcoded references to the PHP 5.x download location, its checksum, and its version.

In order to test things and bring them into a more DRY configuration, I created an `abstract-php-versions.rb` file (for lack of a better initial name) and created a module that exposes...

* Download URL
* Version
* Checksum information
* GitHub location
* GitHub branch name

...and then imported that module into the `php56` formula as well as the `AbstractPhp56Extension` so that they would automatically pick up any change in those values.

As I was unsure whether Homebrew needed the physical formula files to be updated in order to detect a change in configuration (i.e.: `brew outdated`), I tested making changes to the version stored in `abstract-php-versions.rb` and found `brew outdated` properly saw that each dependent module then showed as needing an update.

Example from changing alpha.1 -> alpha.2:

php56 (5.6.0-alpha.1 < 5.6.0-alpha.2)
php56-mcrypt (5.6.0-alpha.1 < 5.6.0-alpha.2)
php56-pcntl (5.6.0-alpha.1 < 5.6.0-alpha.2)
php56-pdo-dblib (5.6.0-alpha.1 < 5.6.0-alpha.2)
php56-pspell (5.6.0-alpha.1 < 5.6.0-alpha.2)