Problem/Motivation

Follow-up from #3258987: Status report should warn about OPcache bug in PHP 8.1.0 to 8.1.5 and #3294938: Increase RECOMMENDED_PHP to 8.1.6.

PHP versions between 8.1.0 and 8.1.5 have an opcache error that breaks the autoloader when there's a deprecation message from PHP. Not all Drupal modules are PHP 8.1-compatible yet so there are a fair few deprecation errors around, also PHP 8.1.6 was only released six weeks ago so might not be available for everyone yet.

I think we should probably lower RECOMMENDED_PHP on Drupal 9.4 to 8.0 so we're not encouraging people to update to either a version with the error or one they might not have available to them yet. However we could just go the other way and backport #3294938: Increase RECOMMENDED_PHP to 8.1.6 instead, in which case we can just mark this issue won't fix and cherry-pick the commit from there.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Following the development of Drupal 9.4.0, we have discovered PHP versions 8.1.0-8.1.5 have a bug with the PHP OPcache that may cause intermittent fatal errors at runtime for class autoloading. Since PHP 8.1.6 is recent it may not yet be available on hosting platforms, the minimum recommended PHP version for Drupal 9.4 has been lowered to 8.0. PHP 8.1.6 or higher is still the best choice for forward-compatibility with Drupal 10.

Issue fork drupal-3295085

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch created an issue. See original summary.

xjm made their first commit to this issue’s fork.

xjm’s picture

Title: Lower RECOMMENDED_PHP on Drupal 9.4.x to 8.0 OR backport #3258987 » [9.4 ONLY] Lower RECOMMENDED_PHP to 8.0
xjm’s picture

Status: Active » Needs review

xjm’s picture

Issue summary: View changes
Issue tags: +9.4.4 release notes
xjm’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

Small change to snippet.

catch’s picture

Note that if we also backport #3258987: Status report should warn about OPcache bug in PHP 8.1.0 to 8.1.5 to 9.4 (which we should), then we'll still tell people on 8.1 to use a PHP version >= 8.1.6 so they avoid the bug, this is more about people who might be on shared hosting, running OK on 8.0, with the ability to update PHP to 8.1.4 but not any higher than that yet.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community

With the reasoning provided here, it seems reasonable to lower the recommended version. The CR and release note looks good. Also the code change looks good 👍

catch’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.4.x, thanks!

  • catch committed b0d98d9 on 9.4.x
    Issue #3295085 by xjm, catch, quietone, lauriii: [9.4 ONLY] Lower...
xjm’s picture

Published the CR. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.