Continues integration in PHP, why, what and how...

Author: Wilco Jansen

The term 'Continuous Integration' originated with the Extreme Programming development process, as one of its original twelve practices. When I started developing in open source we worked together with a group of open source (volunteer) developers, having some basic infrastructure like version control and coding guidelines in place.

An important part of any software development process is getting reliable builds of the software. Despite it's importance, we are often surprised when this isn't done. Within the Joomla project the quality of the CMS is maintained manually by a group of people, and I found out that this is a very time consuming and and environment where a simple fix in the software can break a lot of other areas.

I will discuss the process that has put into place on a different project where we implemented a continues integration process. It stresses a fully automated and reproducible build, including testing, code analyses, API documentation and package generation process that runs after every commit. One of the hardest things to express about continuous integration is that makes a fundamental shift to the whole development pattern, one that isn't easy to see if you've never worked in an environment that practices it. In fact most people do see this atmosphere if they are working solo - because then they only integrate with themself. For many people team development just comes with certain problems that are part of the territory. Continuous integration reduces these problems, in exchange for a certain amount of discipline.

The fundamental benefit of continuous integration is that it removes sessions where people spend time hunting bugs where one person's work has stepped on someone else's work without either person realizing what happened. These bugs are hard to find because the problem isn't in one person's area, it is in the interaction between two pieces of work. This problem is exacerbated by time. Often integration bugs can be inserted weeks or months before they first manifest themselves. As a result they take a lot of finding.