Joomla! goes PHP 5 PDF Print E-mail
Written by Wilco Jansen   

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).

 
93 Votes

18 Comments

Feed
  1. Yes! Good news!
  2. good news
  3. I think we should also move to MySQL 5 only. It's really the same decision. MySQL 5 has been in production for 2 1/2 years. People who are really concerned about rock solid stability will wait a year after the release of Joomla 1.6 to move to it - so by then we're talking about MySQL 4 having been replaced for 4 years before a major installation moves to it. Unlike PHP, most hosts have moved to MySQL 5 because it's easier to maintain and it supports virtually all MySQL 3 and 4 code.

    MySQL 5 has

    1. Far superior query cache and optimization.
    2. Support for subqueries.
    3. Full referential integrity (well, better than 4 at least).
    4. Support for more and better hooks to Python, PHP, etc...
    5. The list goes on.

    Regardless of the features and stability improvements, it's just time to move to MySQL 5 for maintenance reasons. MySQL 5.1 will be in production by the time Joomla 1.6 is in production - so you'll be supporting one version back which fits the criteria above.
  4. Are there timelines available, so that developers of extensions know what they have to do by when?
  5. What about some hosts like mine who are so reluctant to upgrade to PHP 5 as it "breaks a lot of stuff"?
  6. I honestly think it will be a great move from not only a host point of view but also a great move to keep up with the latest technology.
  7. Surely PHP 5.1 will be compatible too?! That's what our Red Hat Enterprise Linux 5.2 server has so please don't make 5.2 mandatory.
  8. I applaud both decisions. I've been waiting for the php5.2 decision for a long time!

    I for one will not be developing any more new php4 extensions (even for Joomla 1.5)
  9. As much as I anticipate the release of 1.6, the decision to move PHP5.2+ is great news. PHP4 has been great and the reason there's PHP5 is a result of improvements of earlier versions. It's time to move forward and use more advanced tools that will allow Joomla to be a far more superior CMS that it already is.
  10. Good news, I am reading a PHP book and now understands that is not worth to waste effort in including support for PHP 4. As said in another comment: move forward.
  11. This are indeed excellent news. It's time to move forward!
  12. Very good decision. It is not an easy decision or an easy process but php4 needs retired. It is the responsible thing to do.
  13. Yay, good to hear. Left php4 a long time ago and have much appreciated the move to the newer version.
  14. this is an great news. i personally left using php 4 and mysql 4 long time ago :)
  15. Awesome!!!
    Love the decision. I am anxious for and almost sure of a performance boost here!
  16. As a host, we warmly welcome this decision. More and more open source projects should be doing the same things.

    Great stuff.
  17. indeed good news ;)
  18. I think this is *excellent!* Thanks!

Add Comment


    • >:o
    • :-[
    • :'(
    • :-(
    • :-D
    • :-*
    • :-)
    • :P
    • :\
    • 8-)
    • ;-)



    Click to get a new image.