Boilerplate for a professional PHP team development environment Boilerplate for a professional PHP team development environment database database

Boilerplate for a professional PHP team development environment


I'll start. feel free to edit and improve this

This is for a ficticious product called: dundermifflin.com

  1. Setup a development virtual machine running the same software you plan on using in production: e.g. Ubuntu with PostgreSQL, Apache and PHP5.

  2. Each developer runs their own copy of this VM with the hostname set to their username, (e.g. phpguy.dundermifflin.com)

  3. Setup a central staging server (same as the development VM). This is staging.dundermifflin.com.

  4. Setup a central Subversion server with a new repository for dundermifflin.com. This is devel.dundermifflin.com.

    • 4a. Add post-commit hook to run tests for "trunk" commits
    • 4b. Add post-commit hook to package/deploy to staging server for commits tagged "staging"
    • 4c. Add post-commit hook to package/deploy to production server for commits tagged "release"

This method does not address database continuous integration which means rolling back SVN to a previous revision will break the build unless your database is very static. Suggestions?

  1. Use Bugzilla on the central Subversion server (devel.dundermifflin.com) for bug tracking.

  2. Write a shell script to run PHPUnit/SimpleTest tests (to be called by item 4a).


For continuous integration, linked with your version control system, and automated unit testing I find this article very interesting:

Continuous builds with CruiseControl, Ant and PHPUnit