PHP 7.4 going end of life, PHP 8.4 ramping up

Publié
2024-12-22 11:16
Written by
Eileen - member of the CiviCRM community and Core Team member - about the Core Team

In line with our practice over recent years (per 7.3, 7.2, 7.1), we are ending our support for php 7.4 two years after PHP dropped support for it. This means that the 5.81 release will be the last CiviCRM release supporting PHP 7.4. As we have done in previous years we will continue to support PHP7.4 in the ESR release - meaning that anyone who needs to stay on PHP7.4 for another 6 months can get that by signing up for the ESR.

It has been suggested that Wordpress users may be using older Wordpress plugins that make it hard for them to get off PHP7.4 and if this turns out to affect a significant number of sites we may look at running the 5.81 ESR release for longer than the usual 6 months. However, it's important to realise there are real costs to us to do this so we would need to evaluate it carefully.

Ending PHP7.4 allows us to get serious about getting PHP8.4 compatible. I had hoped we could make CiviCRM work with PHP8.4 in time to be all go on day one of it's being released (back in November). Unfortunately I found that the various libraries we use that are PHP8.4 compatible had mostly dropped support for PHP7.4 and I wound up putting the effort on hold until we removed support for PHP7.4 - and hopefully we can get PHP8.4 support covered with the the next couple of months.

One issue we have hit is that extensions are not always able to follow the same life cycles as core code. For example I have already had to drop support for PHP7.4 in the Omnipay extension due to issues Drupal users were having. I was reluctant to do this because there is no way for installers to know the php versions an extension supports, other than by assuming it is the same as the PHP version. Likewise with Smarty - there is no way to make it clear that an extension has been upgraded to support Smarty5 - or to denote that it does not support Smarty2. For example Extended Reports is not considered compatible with Smarty2 as there is some functionality in it that will crash on Smarty 2 but this has no visibility.

Getting information about PHP & Smarty visibility out there has always been a bit chicken and egg - ie there hasn't been much point adding it to extensions as there was no visibility or functionality and not much point adding the functionality as no extensions declared it. In order to break this standstill we are adding visibility for the supported versions in 5.82 - with the goal to then push to get extensions to start adding support declarations. Once a significant number do so we will start to make it more visible which ones have not done so and to add warnings and functionality around that.