After reading the "Modern PHP workflow" article in the November 2008 edition of php|architect magazine which discussed unit testing (phpUnit), build tools (Phing) and continuous integration (Xinc), I'm inspired the learn more about some of the tooling available for PHP, especially Phing.

In the past I've often handled deployment to a production server by running the live site as a subversion working copy and simply running an "svn update" on the production box to deploy the latest version of the code.

Do you use build tools for PHP code? What advantages you you believe they offer over deploying direct from subversion? What should I look out for, or what gotchas might I face?


Thanks for accepting my answer. If you need any further help/discussion, let me know!

Written by Jilles

The link to php|architect magazine is not working :(

Written by AntonioCS

@AntonioCS looks like it changed since I posted the question 10 months ago... Fixed now.

Written by Jim OHalloran

Accepted Answer

I have used both Phing and Ant and prefer the latter much more. I initially went with Phing due to it being written in PHP but to be honest it isn't as mature as Ant. In the end, having a mature buildsystem with a large community is worth more.

Things done with Ant/Phing:

  1. From a base checkout loalize to a specific language, ensure dependencies are there (other libs, directories, etc)
  2. if you have them, compile templates, etc
  3. Bring target database up to the required version, depending on the checked out code version
  4. run unit tests, etc
Written by Jilles
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki