Opened 3 years ago
Closed 7 months ago
#6612 closed task (blessed) (fixed)
Prepare for bumping the recommended PHP version to 8.0+
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Component: | General | Keywords: | has-patch |
| Cc: |
Description
Background: #6432.
Bumping the recommended version for WordPress core to PHP 8.0+ was briefly discussed in #6432 as something to be re-evaluated after the WordPress 6.1 release.
For context, the relevant ServeHappy API constants are:
RECOMMENDED_PHPis the latest branch of PHP which WordPress.org recommends.SUPPORTED_PHPis the lowest branch of PHP which is actively supported.SECURE_PHPis the lowest branch of PHP which is receiving security updates.ACCEPTABLE_PHPis the lowest branch of PHP which is still considered "acceptable" in WordPress. Sites with a version lower than this will see the ServeHappy dashboard widget urging them to update.
At the moment, all four are set to PHP 7.4, which is no longer accurate. Now that PHP 7.4 is no longer supported as of 28 Nov 2022, the correct values would technically be:
RECOMMENDED_PHP: 8.1(as only versions with active support should be recommended)SUPPORTED_PHP: 8.1(as this is the version with active support)SECURE_PHP: 8.0(as it still has security support until 26 Nov 2023)ACCEPTABLE_PHP: 8.0(as users should see an update prompt if using an older, unsupported version, e.g. 7.4)
Bumping the SUPPORTED_PHP, SECURE_PHP, and ACCEPTABLE_PHP values would technically be the correct thing to do. However, bumping them separately from RECOMMENDED_PHP would result in a weird user experience of displaying a "PHP Update Recommended" dashboard widget for PHP 7.4, while at the same time stating that 7.4 is the minimum recommended version (see the screenshot). So it would be clearer to bump them all when RECOMMENDED_PHP is also unblocked from being bumped to 8.0+.
Some of the biggest concerns with bumping the recommended version to 8.0+ are:
- Incomplete test coverage for WordPress core.
- Unknown state of plugin and theme compatibility.
While the former is a work in progress, @azaozz suggested some ideas to help with the latter:
Been wondering if we can come up with some automated testing. Perhaps a script that installs 100 plugins at a time (in a Docker install), then activates them one by one to confirm no errors or warnings. It's far from a full testing but is a start...
Also maybe something "special" in the plugins and themes repo to indicate PHP 8 compatibility? Even a feedback that can be added by users (i.e. attempt to crowd source it). May work for the more popular plugins :)
Probably worth a meta ticket to come up with ideas/have a place for a discussion.
This ticket aims to start the discussion on the prerequisites for updating the recommended version to PHP 8.0+.
Change History (7)
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-php by jrf. View the logs.
2 years ago
This ticket was mentioned in PR #497 on WordPress/wordpress.org by @johnbillion.
7 months ago
#3
- Keywords has-patch added
This ticket was mentioned in PR #9206 on WordPress/wordpress-develop by @johnbillion.
7 months ago
#4
Meta ticket: https://meta.trac.wordpress.org/ticket/6612
#5
@
7 months ago
This was fixed in r14480. Cheers! (I don't have the capability to close meta tickets.)
@johnbillion commented on PR #9206:
7 months ago
#6
Committed in https://core.trac.wordpress.org/changeset/60437
Bumpity bump.
SUPPORTED_PHPgets bumped to 8.3 because that's the oldest actively supported versionSECURE_PHPandACCEPTABLE_PHPget bumped to 8.1 because that's the oldest version receiving security updatesRECOMMENDED_PHPgets bumped to 8.3 because that's the newest version that's fully supported by the latest version of WordPressRefs: