Published
Monday, August 14, 2017 - 23:58
Written by

Compatibility with PHP 5.3 will end in December 2017, and compatibility with PHP 5.4 will end in March 2018. These changes follow a number of discussions and a multi-year deprecation process. The current recommended version is PHP 5.6.

Discussion

According to php.net, PHP v5.5.x became "end of life" in July 2016. This means that the official publishers of PHP no longer support v5.5.x -- if there are security issues in the PHP runtime, the PHP project won't provide advisories or fixes. They recommend that all PHP users upgrade. (That's just the security side of the equation -- upgrading to a newer PHP also brings access to better libraries and design-patterns.)

But... for small organizations using CiviCRM, upgrading their servers to a newer version of PHP would be an expense. So CiviCRM has continued to support PHP 5.5 (declining to use better libraries and design-patterns). How long has CiviCRM continued supporting PHP 5.5 beyond its "end of life"? One year and counting.

PHP v5.4.x became "end of life" in September 2015. (It was released in 2012.) But upgrading would be an expense for consumers, so CiviCRM continued to maintain compatibility with it. How long have we continued supporting this beyond its "end of life"? Almost two years... and still counting.

PHP v5.3.x became "end of life" in August 2014. (It was released in 2009.) And yet CiviCRM continued to maintain compatibility with it. How long have we continued supporting this beyond its "end of life"? Three years and counting.

Over the past three years, we've had several discussion threads about deprecating PHP 5.3 on the CiviCRM media (mailing-lists, issue-tracker, etc; the most recent: CRM-20941).  Based on those discussions, we adopted a gradual deprecation beginning with v4.7.0. v4.7.0 maintained support for PHP 5.3 but introduced a warning to notify administrators if their system had an old, deprecated version of PHP. In the 18 months since, we've happily witnessed a gradual transition as administrators upgraded. As of early August, only ~1% of sites on CiviCRM v4.7.x are still running PHP 5.3, and only ~5% run PHP 5.4 -- and those percentages continue to shrink every month. CiviCRM could switch to PHP 5.4 tomorrow, and only a few administrators could tell the difference. Even so, we really like to give advance notice. (Brace yourself, more advance notice is coming!)

I'm glad CiviCRM provided a transition period for PHP 5.3, but it's time to wrap-up -- continuing support puts pressure on our contributors and reduces maintainability. The PHP 5.3 zombie-release will have only one more Halloween to romp around and terrorize developers. Then PHP 5.3 goes in the ground. This means that Christmas can be a time of joy, when our contributors finally unwrap the shiny gifts of PHP 5.4, like traits and []s. (And... I hope this doesn't spoil the surprise... but Valentine's Day may bring a heart-shaped box of 5.5's try-catch-finally blocks.)

Timeline

  • November 2017 -- Primary test systems switch to PHP 5.4
  • December 2017 -- First release that requires PHP 5.4
  • February 2018 -- Primary test systems switch to PHP 5.5
  • March 2018 -- First release that requires PHP 5.5