[wp-meta] [Making WordPress.org] #6612: Prepare for bumping the recommended PHP version to 8.0+
Making WordPress.org
noreply at wordpress.org
Tue Dec 6 01:35:40 UTC 2022
#6612: Prepare for bumping the recommended PHP version to 8.0+
----------------------------+--------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone:
Component: General | Keywords:
----------------------------+--------------------
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_PHP` is the latest branch of PHP which WordPress.org
recommends.
* `SUPPORTED_PHP` is the lowest branch of PHP which is actively supported.
* `SECURE_PHP` is the lowest branch of PHP which is receiving security
updates.
* `ACCEPTABLE_PHP` is 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 [https://www.php.net/supported-versions.php 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 [attachment:6432.php-update-recommended-7.4.x.png:ticket:6432
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+.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6612>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list