Problem/Motivation
Related issues:
- #3223443: [policy, no patch] Process for dealing with EOL PHP versions during the Drupal 10 and future release cycles
- #3223435: Track PHP 8.1 support in hosting and distributions
- #3173787: [policy] Require PHP 8.1 for Drupal 10.0 if a dependency does, otherwise require PHP 8.0. (up from 7.3 in Drupal 9)
- #3252386: Use PHP attributes instead of doctrine annotations
In all of the above, we are still exploring whether we should (or even can) require PHP 8.1 for Drupal 10. However, we certainly can and should recommend it. There are a few PHP 8.1 issues still outstanding, but they are mostly feature requests or notices/deprecation warnings. The hard blockers for PHP 8.1 use (e.g. upstream dependency incompatibilities and fatals) have (mostly? entirely?) already been resolved in Drupal 9.3.
Proposed resolution
- Increase
RECOMMENDED_PHPto 8.1 now, to set expectations that it's still the best choice for D10 even though we might not be able to require it yet. - General changes to how the recommended PHP version works should be part of followups in #3223443: [policy, no patch] Process for dealing with EOL PHP versions during the Drupal 10 and future release cycles.
Remaining tasks
- Update the system requirements docs accordingly.
- Decide whether to additionally backport this recommendation to 9.4.
User interface changes
Users on PHP 8.0 will see the normal messaging about PHP 8.1 being the recommended version.
API changes
None.
Data model changes
None.
Release notes snippet
PHP 8.1 is now the recommended PHP version to use with Drupal 10. (It may be the required PHP version before 10.0.0 or in a future release.)
Issue fork drupal-3261357
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
xjmDrafted https://www.drupal.org/node/3261358.
Comment #5
catchLet's do it.
I also think we should backport this to 9.4, it'll be a solid six months since PHP 8.1's release when 9.4 comes out, and we (probably) won't have a later 9.x minor release to make the change in.
Comment #6
xjmDocs updates done: https://www.drupal.org/node/2891690/revisions/view/12504513/12536671 (We might need to change it a little further when 9.4 goes into beta, but we'll already be updating the content for D10 around then anyway.)
Comment #8
gábor hojtsyCommitted 0198e04 and pushed to 10.0.x. Thanks! Published change record as well.
Comment #10
gábor hojtsyAnd backported.
Comment #12
xjm