Making WordPress.org

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: sergeybiryukov's profile SergeyBiryukov 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_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 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

Bumpity bump.

  • SUPPORTED_PHP gets bumped to 8.3 because that's the oldest actively supported version
  • SECURE_PHP and ACCEPTABLE_PHP get bumped to 8.1 because that's the oldest version receiving security updates
  • RECOMMENDED_PHP gets bumped to 8.3 because that's the newest version that's fully supported by the latest version of WordPress

Refs:

#5 @johnbillion
7 months ago

This was fixed in r14480. Cheers! (I don't have the capability to close meta tickets.)

#7 @dd32
7 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks! Sorry I didn't see the meta ticket ref on the GitHub PR.

Marking as resolved, and bumped your permissions @johnbillion :)

Note: See TracTickets for help on using tickets.