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
Setup a development virtual machine running the same software you plan on using in production: e.g. Ubuntu with PostgreSQL, Apache and PHP5.
Each developer runs their own copy of this VM with the hostname set to their username, (e.g. phpguy.dundermifflin.com)
Setup a central staging server (same as the development VM). This is staging.dundermifflin.com.
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?
Use Bugzilla on the central Subversion server (devel.dundermifflin.com) for bug tracking.
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: