During the past weeks we have been discussing the PHP, MySQL and legacy requirements for future versions of Joomla! We already decided to move to MySQL 4.1+ for Jooma! 1.6. However, the question remained as to when we drop PHP 4 and 1.0 legacy support. After much discussion and research we've made some decisions regarding these final two items.
Legacy mode
The 1.5 legacy layer was introduced to bridge the gap between versions 1.0 and 1.5. It was a way site owners could migrate their sites to Joomla! 1.5, and allow extension developers more time to migrate to what we now call 1.5 Native. Legacy Mode was actually designed as an extension itself - a plugin. This was done so that it could be easily enabled and disabled. But more importantly it was a container that could be easily dropped in a future version.
Legacy Mode is a useful feature for Joomla!, but we have decided that it will only ever apply to "one version back". This means that Joomla! 1.6 will have a Legacy Mode to support the changes made relative to version 1.5, but will not longer support any extension designed for Joomla! 1.0. We feel this strikes the best balance between encouraging developers and site owners to move forward and reduce the strain on the maintenance of too many versions of code.
PHP 4 or PHP 5?
PHP 4, deployed on tens of millions of servers globally, is among the most successful languages of all time, but this is coming to an end. Active development for version 4 of the scripting language has been discontinued and security updates will conclude in August 2008. There are still some holdouts opposing a complete transition to PHP 5 and it's not entirely clear whether or not PHP 4 will ever truly disappear. Ironically though, PHP 5 isn't a new technology, either but it has been the anointed successor to PHP 4 since its initial launch in 2004.
Many open-source projects already have decided to move to PHP 5 and the discussion within the Joomla! community and the development working group has been running for some time. Our support, to date, for PHP 4 was to smooth the migration from 1.0 to 1.5 and, at the time, hosts supporting PHP 4 was not considered sufficient to move.
Today though, our research indicates that for all the sites that are running 1.5, only 33% are on PHP 4 hosts. The balance of sites are running on various versions of PHP 5. Other factors that we have taken into consideration include third-party libraries that we use (TCPDF, Simplepie and PHPXMLRPC for example) that are also progressively dropping support for PHP4.
So what do we have to gain with moving to PHP 5? Let me try to summarize this:
- Official support for PHP 4 will end in August this year (2008). There will be no further security updates or bug-fixes.
- 3rd party libraries like TCPDF, Simplepie and PHPXMLRPC are only being maintained for PHP 5.
- We can drop some of our existing libraries reducing our code size (such as DOMIT).
- We only need to maintain our code base that is build on one PHP 5 version, this will speed up development and testing because we only will have one PHP version to support.
- We don't need to test on two quite different versions of PHP.
- PHP 5 adds many new features and design changes that make developing robust, secure, feature-rich software faster and easier. It is possible to emulate some of those features in PHP 4 but requires its own legacy layer to do so. Such features include fast and easy XML support for improved web services, better timezone handling, vastly improved database tools and input tools to make PHP applications more secure, and many others.
- It will improve speed, performance and security.
This is a pretty impressive list! After careful consideration, and collecting data clearly showing that the hosting market is clearly moving towards PHP 5, we have decided to move to PHP 5.2+ on Joomla! 1.6.
This does not mean we be fully re-factoring all of the 1.6 code to be PHP 5 native. However, it does give us new options in terms of selecting the best third-party library for respective jobs, and allows us to create new work natively in PHP (for example the ACL engine).