A few months have passed since the last Phing development update in October, so here’s an overview of some of the recent changes.
Phing
Phing development update
A few months have passed since the last Phing development update, so it’s about time to discuss some of the recent changes.
Phing development update
A few years ago I pledged to publish regular updates on Phing’s development. I’m a little ashamed that I haven’t done that for nearly three years. Needless to say, a lot has happened, so it’s about time to post an update!
Phing development update
The last Phing development update was almost a year ago, so I guess it’s about time for a discussion of what’s new in Phing world.
2.5.0 and Semantic Versioning
The most important news in this update is the brand new 2.5.0 release (pushed out yesterday). We bumped the minor version number because we now (try to) follow the Semantic Versioning spec, and this release introduces new functionality. Our changed roadmap reflects this as well.
This version closes the following issues:
Other goodies
The past few months Phing has seen a few interesting additions:
- Composer packager support (we’re listed on Packagist as well)
- phploc task
- apply task
- improved phpdoc(2) support
- lots of documentation, bug and other fixes
GitHub
The move to GitHub in early 2012 has been very successful in speeding up Phing’s development. We can definitely still use your help though, so fork our project and submit a pull request. Thanks!
Phing development update 01/04/2012
Roughly a month ago I posted the first in, what should become, a series of development updates concerning Phing. This second blog post details the most important updates during the past four weeks as Phing is moving steadily towards another release (2.4.10 is due out next week).
User Guide starts move to DocBook format
The biggest commit last month was without a doubt the merge of Johan Persson’s docbook5 branch, which adds a DocBook 5 version of the entire Phing User Guide, accompanied by its own rendering infrastructure. This feature has been on my personal wishlist for a long time, and it’s finally around the corner! The new docs will probably not make it into 2.4.10, but, at some point in the coming weeks, the ‘live’ user guide (on the Phing website) will be switched to the new format. The 2.4.11 packages will also contain the new docs.
Liquibase docs
After succesfully merging the Liquibase tasks last month, Stephan Hochdörfer completed the addition by submitting a pull request containing the necessary documentation!
PhpDocumentor
You’ve probably heard about this, the popular documentation tools phpDocumentor and DocBlox have merged! Phing supports the new phpDocumentor releases by adding a phpdoc2 task.
PHP 5.4 compatibility
Phing itself seems to work fine with the recently released PHP 5.4, however, the unit tests experienced some problems – these have been corrected to make sure the (unstable) snapshot builds are pushed out regularly.
PHAR package
Starting with the upcoming 2.4.10 release, each new version of Phing will also be available as a PHAR package. Initially, this will just contain Phing itself (similar to the PEAR package). After that, the package will be expanded with a few popular dependencies (depending on feedback).
Various (bug)fixes, the 2.4.10 release
Last but not least, here’s a list of tickets that have been closed since the last update.
Phing development update
Starting today, I’ll post regular updates on the development of Phing (which is, as you might know, a PHP build tool based on / inspired by Apache Ant).
For the past three years I’ve been the lead developer on this open source project, and thus responsible for deciding the direction of the project, integrating the various contributions, publishing releases, etc. Should you be interested, Lorna Jane Mitchell published an excellent post detailing some of the challenges faced by open source project leads.
The last few months have been especially interesting, as I’ve moved the Phing source code to GitHub. This has greatly improved the number of contributions and in general speeded up the development of Phing.
Let’s discuss some of the interesting commits that were made during the past two months!
Try/Catch task
A feature that has been requested before (and has been on my personal wishlist) is the ability to run task(s) whenever a task fails (very similar to PHP’s try/catch statement). During my talk at the PHPUK2012 conference, one of the attendees asked when this feature could be expected. So, while waiting for my flight home I decided to get busy and add the trycatch task.
<trycatch property="prop.testTryCatchFinally"> <try> <fail>Tada!</fail> </try> <catch> <echo>In <catch>.</echo> </catch> <finally> <echo>In <finally>.</echo> </finally> </trycatch>
Parallel task
After a very interesting talk by Jeroen Keppens (@jkeppens) during this year’s PHP Benelux conference, Mike van Riel (@mvriel), the author of DocBlox, and me set out to enable some form of parallel processing in both Phing and Docblox. Mike authored a generic library, which I used in the new parallel task. This task is still very experimental (and it only works on Linux due to some OS limitations), but it’s definitely a nice example of how the community works and inspires!
<parallel threadCount="100"> <echo>Job 1</echo> <echo>Job 2</echo> <echo>Job 3</echo> <echo>Job 4</echo> <echo>Job 5</echo> <echo>Job 6</echo> <echo>Job 7</echo> <echo>Job 8</echo> <echo>Job 9</echo> <echo>Job 10</echo> <echo>Job 11</echo> <echo>Job 12</echo> <echo>Job 13</echo> <echo>Job 14</echo> <echo>Job 15</echo> <echo>Job 16</echo> </parallel>
Liquibase
Together with Stephan Hochdörfer (@shochdoerfer) I’ve been working on integrating his Liquibase (a Java database refactoring / change management application) tasks into the Phing core. The liquibase tasks will complement the dbdeploy task and assist the user with database changes / rollbacks.
ApiGen
ApiGen is a Nette framework based documentation generation tool for PHP 5.3. Phing now supports this tool through the new apigen task, contributed by Jaroslav Hanslík.
RNG schema updates
For a while now, Phing ships with a RNG schema to validate your build files. However, this schema was incomplete and did not contain some of the more recent tasks and changes. Johan Persson has done some invaluable work to get the RNG schema up to date.
Various (bug)fixes, the 2.4.10 release
Steady progress has been made towards the 2.4.10 version (which is scheduled to be released early April). Below is an overview of the tickets that have been closed so far:
Besides those commits, a good amount of other (small) fixes and contributions will make it into 2.4.10. A complete list of commits can be found here. Keep those pull requests coming! 🙂
Building and deploying PHP applications with Phing (PHPUK2012)
Below are the slides of my Phing talk I gave at the PHP UK Conference 2012.
Also, some of the examples discussed during the talk can be found here.
Deploying PHP applications with Phing (PHPNW11)
Below are the slides of the Phing talk I gave during the PHPNW11 conference.
Phing – a PHP Build Tool (presentation)
Below are the slides of a presentation on Phing I gave at this year’s Dutch PHP Conference.
Setting up continuous integration for PHP using Hudson and Phing
“CI gets the most out of Unit Tests by forcing them to be run after every change. Not only that, but with a good CI setup, developers instantly know if they haven’t written enough tests. If avoids the situtation where Joe Bloggs has added in a huge chunk of code with zero tests.”