Making WordPress.org

Opened 19 months ago

Closed 19 months ago

Last modified 16 months ago

#6432 closed task (blessed) (fixed)

Bump ServeHappy PHP constants to 7.4+

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: API Keywords:
Cc:

Description

Background: #5257, #5279, #5727, #WP56199.

The RECOMMENDED_PHP and SUPPORTED_PHP values in servehappy-config.php are currently at 7.4.

The SECURE_PHP and ACCEPTABLE_PHP values are at 7.3, last changed in [10960] / #5727.

Since security support for PHP 7.3 and active support for PHP 7.4 ended last November, these values should be updated. Some context:

  • 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.

Based on the above, it seems like:

  • RECOMMENDED_PHP, same as last time, should probably not be updated to 8.0 yet, due to a large number of breaking changes there and unknown state of plugin compatibility.
  • SUPPORTED_PHP, likewise, should probably not be updated to 8.0 at this time, as that would result in a weird 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). I think it would be clearer to bump this when RECOMMENDED_PHP is also bumped to 8.0.
  • SECURE_PHP should be updated to 7.4.
  • ACCEPTABLE_PHP should also be updated to 7.4, since we want users to have a secure version.

Attachments (1)

6432.php-update-recommended-7.4.x.png (65.4 KB) - added by SergeyBiryukov 19 months ago.

Download all attachments as: .zip

Change History (10)

#1 follow-up: @azaozz
19 months ago

  • RECOMMENDED_PHP, same as last time, should probably not be updated to 8.0 yet, due to a large number of breaking changes there and unknown state of plugin compatibility.
  • SUPPORTED_PHP, likewise, should probably not be updated to 8.0 at this time, as that would result in a weird 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). I think it would be clearer to bump this when RECOMMENDED_PHP is also bumped to 8.0.
  • SECURE_PHP should be updated to 7.4.
  • ACCEPTABLE_PHP should also be updated to 7.4, since we want users to have a secure version.

Yes, all points sound good imho. That pretty much means all four constants will be set to 7.4.

#2 in reply to: ↑ 1 @SergeyBiryukov
19 months ago

Replying to azaozz:

Yes, all points sound good imho. That pretty much means all four constants will be set to 7.4.

Thanks! Yes, that's right.

I suppose a good time for bumping RECOMMENDED_PHP and SUPPORTED_PHP to 8.0 would be at the end of this year, as security support for 7.4 ends in November, and we should not recommend an insecure version :)

#3 @JavierCasares
19 months ago

It is assumed that when WordPress 6.1 is released, which will support PHP 8.0 and 8.1, the data should be changed, and thus be associated with the release of PHP 8.2 and the end of PHP 7.4 support.

#4 @jrf
19 months ago

➕ I fully support updating the SECURE_PHP and ACCEPTABLE_PHP constants to PHP 7.4.

As for when the RECOMMENDED_PHP and SUPPORTED_PHP constants can be updated:
➖ I personally would not be comfortable committing to any timeline for that at this point in time as there are still too many known (and unknown) compatibility issues to say that WP (let alone the wider plugin-sphere) is fully compatible with PHP 8.0/8.1 (or likely to be at a predetermined point in the foreseeable future).

Regarding PHP 8.2: compared to PHP 8.0/8.1 it is a release which is expected to cause much less problems, though the biggest issue (dynamic properties deprecation) is still going to be challenging. For a full overview of everything PHP 8.2, see #WP56009.

It is assumed that when WordPress 6.1 is released, which will support PHP 8.0 and 8.1

@JavierCasares What do you base that on ? I have seen no significant efforts to that effect.

Last edited 19 months ago by SergeyBiryukov (previous) (diff)

#5 @dd32
19 months ago

Agreed, let's update SECURE_PHP, ACCEPTABLE_PHP to 7.4. They're at 7.3 currently.

Let's leave RECOMMENDED_PHP alone and come back to that discussion when we're comfortable that the latest stable release of WordPress (and most major plugins) are 100% compatible.

No need for a timeline, but a general "re-evaluate after the WordPress 6.1 release" is probably good enough for now.

This ticket was mentioned in Slack in #hosting-community by javier. View the logs.


19 months ago

#7 @SergeyBiryukov
19 months ago

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

In 12010:

API: ServeHappy: Bump the minimum acceptable PHP version to 7.4.

Sites with a version lower than this will see the ServeHappy dashboard widget urging them to update.

Additionally, bump the lowest branch of PHP which is receiving security updates to 7.4.

Bumping the recommended PHP version to 8.0 will be re-evaluated at a future time.

Reference: PHP: Supported Versions.

Follow-up to [6728], [6806], [7990], [8065], [8742], [9112], [9959], [9975], [10960].

Props Clorith, azaozz, JavierCasares, jrf, dd32, SergeyBiryukov.
Fixes #6432.

This ticket was mentioned in Slack in #hosting-community by jrf. View the logs.


17 months ago

This ticket was mentioned in Slack in #hosting-community by javier. View the logs.


16 months ago

Note: See TracTickets for help on using tickets.