PHP 5.5 release and Drupal

Sat, 22/06/2013 - 08:35 -- James

Yesterday, the PHP group announced the first stable release of PHP 5.5. This is great news. I shall compile it very shortly so that it can optionally be used on this server. That will allow me to test my various Drupal sites against PHP 5.5, to see if there are any issues.

However the arrival of PHP 5.5 signals the imminent end of PHP 5.3. Back in December 2012, PHP announced that

"the PHP 5.3 series will enter an end of life cycle and receive only critical fixes as of March 2013."

So PHP 5.3 is still supported, but only critical and security issues are being patched. The official advice is that everyone on PHP 5.3 should have moved over to PHP 5.4.

However this creates an interesting situation for Drupal. When PHP 5.4 was first released, quite a few Drupallers found that some of the changes from PHP 5.3 to PHP 5.4 were breaking changes. Some code in Drupal core, and some in contributed modules and themes, needed changing to ensure compatibility with PHP 5.4. This means that quite a few Drupal sites are still running PHP 5.3; I cannot even consider dropping PHP 5.3 support on this server yet.

The summary, then, is this: PHP 5.5 is now released, and there are still plenty of incompatibilities between Drupal and its predecessor, PHP 5.4. This is forcing some to keep using PHP 5.3, which is now in its EOL phase.

That means that solving the remaining PHP 5.4 issues becomes a high priority for the Drupal community.

In an ideal world, all issues in the issue queues would have been tagged with a PHP 5.4 tag. Sadly, across core and contrib, only 7 open issues have been tagged with "PHP 5.4", and just 3 have been tagged with "php5.4".

However a plain-text search reveals that there are 251 issues containing the string "PHP 5.4". 57 of those relate to Drupal core. That would give anyone in the Drupal community a good place to start. Are there issues there that "Needs Review" - could you test the patch and see if it solves the problem? Perhaps someone could work through that list and find out which issue actually contain a compatibility issue with PHP 5.4 and do some tagging to help the community work through these.

Before people start finding the code we need to change to work with PHP 5.5, it would be good to get most of the PHP 5.4 issues resolved./blockquote

Blog Category: 

Comments

James's picture
Submitted by James on

OK - I've now moved this site over to PHP 5.5.

For now. If I hit snags, I'll pull it back to 5.4. But I need to start testing sometime.

It seems to me that there are fewer potentially breaking changes between 5.4 and 5.5, compared to moving from 5.3 to 5.4 - but now's the time to find out!

Pierre's picture
Submitted by Pierre on

Hi,

It should not have BC breaks in 5.5, but some bug fixes required minor edge cases (and sometimes undocumented) incompatibility.

We (Msft/OSTC) have been testing drupal during the whole release phase and fixed actual BC breaks. Sadly we don't test the major themes or addons. It would be nice to have a more real life app to run our tests (any volunteer? :).

However, it would be also nice to have drupal devs test newer releases (beta, RC at least) before final as well ;)

Ron's picture
Submitted by Ron on

It looks like APC is in beta still for PHP 5.4... so thats not really a workable solution for any production sites. Getting Drupal ready for 5.4+ is important.

Also, I believe that  5.5 includes Zend OPcache, and we won't need/use APC at that point. So, we should also look at testing the code with this OPcache to make sure it still works ok.

Mark's picture
Submitted by Mark on

FYI, after reading this, I added a 'PHP 5.4' tag to an issue with 'PHP 5.4' in the summary, but it was then removed.  Not sure why, just making you aware of the issue.

 

Add new comment