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
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:
Comments
Comment #3
xjmComment #4
xjmChange record: https://www.drupal.org/node/3295154
Comment #6
xjmComment #7
xjmComment #8
quietone CreditAttribution: quietone at PreviousNext commentedSmall change to snippet.
Comment #9
catchNote 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.
Comment #10
lauriiiWith 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 👍
Comment #11
catchCommitted/pushed to 9.4.x, thanks!
Comment #13
xjmPublished the CR. Thanks!