Monday, 7 January 2008

MySource Matrix 3.18.0 RC1 released with PHP5 support

MySource Matrix 3.18.0 RC1 was released today; the first release that supports PHP5. It's been quite tough moving such a large project from PHP4 to PHP5 for a couple of reasons.

Changes to reference handling has been a big one. We've been changing so many lines of code to fix E_STRICT reference errors that we inevitably end up with some variables being copied rather than passed by reference.

Moving from PEAR::DB to PDO has also been a big deal. Not only have we moved to PDO, but we've also moved to the MySource4 DB abstraction layer, called DAL. DAL gives us the ability to write a single XML-based query for both Oracle and PostgreSQL, and native support for bind variables (an often requested feature). Learning the differences in syntax between PEAR::DB and DAL took time, as did DAL changes that were required to support the more complex queries that Matrix contains. In the end, we have a better, faster and more flexible DB abstraction layer that will see Matrix through until the MySource4 release and beyond. We also get the added benefit of testing such a key component of MySource4 in the real world.

On a more personally note, the large number of changes and testing required for this release got me more involved in Matrix development than I have been in a few years. Instead of sitting back and watching, I had enough time to dig in and convert part of the core, some packages and the unit testing system.

Speaking of unit testing, I couldn't imagine going through a process like this without an extensive unit test suite and some dedicated testers. Day-to-day, it is easy to forget why you write tests as you rarely get failures if you are careful enough. During a large core change like this, using the failing tests as a todo list gives you some guidance and, of course, confidence in your changes.

Besides PHP5 support, 3.18 has a couple of new features and improvements, some from the feature bazaar at the MMIUC 07. Many of the improvements are performance-based, with HIPOs and paint layouts getting special attention. All performance improvements in 3.18 have been road-tested in MySource4 first, so even though MySource4 has not been released, MySource Matrix users can be confident that they are benefiting indirectly from the project even at this early stage.

MySource Matrix 3.18.0 RC1 is not ready for production, but you can download a copy of the GPL version to give it a test on PHP 5.1.6 and PostgreSQL. Grab it from the MySource Matrix download page.