Make WordPress Core

Opened 15 months ago

Last modified 14 months ago

#51139 new enhancement

Allow "tested up to" PHP version statement for plugins & themes

Reported by: aaroncampbell Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


Minimum PHP Version support for plugins and themes was added in #40934 (see also #meta2952 and #meta3718 for support added to the plugin and theme directories). At that time a "tested up to" PHP version was talked about but seemed like it needed it's own ticket. This is that ticket :)

I'm proposing to allow plugins and themes to have a "tested up to" PHP version statement (Not a maximum). This version statement should not mean that plugins should not be shown in the new plugins screen, etc, but can be used for warnings for users like we do with "tested up to" WordPress versions.

Considering the new PHP version support proposal, this will help to better equip both users and hosts to make intelligent, informed decisions around upgrading PHP. Host would be able to scan sites and proactively update PHP without relying on slow linting tools.

One of the biggest hurdles will be the time it takes to get enough plugin developers using this header for the data to be useful. The biggest, most popular plugins will adopt it quickly which will help immediately. Also, for those plugins hosted on the .org directory, we could use a threshold to fill in the data for plugins that haven't yet specified it. If some number of sites, say 100 for this example, with somePlugin version X.Y.Z say they're on PHP A.B.C when checking to see if there are updates available, we could reasonably say that X.Y.Z is compatible up to PHP A.B.C. We could only do this for plugins with enough installs to meet that threshold, but it would certainly make the information immediately useful for anything needing to automate PHP version support checks.

To do this, the following work would have to be done:

  • Plugin header parser changes for "tested up to" PHP version statement.
  • Warnings added that use this header (mockups needed)


Plugin directory

Attachments (1)

51139.plugin-dir-mockup.png (20.9 KB) - added by aaroncampbell 15 months ago.
Plugin directory plugin sidebar with "Tested up to PHP" added

Download all attachments as: .zip

Change History (10)

15 months ago

Plugin directory plugin sidebar with "Tested up to PHP" added

#1 @desrosj
15 months ago

  • Type changed from defect (bug) to enhancement

#2 @SergeyBiryukov
15 months ago

Just linking to some previous discussions and comments on the Tested PHP header:

Some thoughts on the naming:

Since the Requires PHP header is based on the shorter name (and not Requires at least PHP), it seems that Tested PHP would be more consistent with the existing naming (as opposed to Tested up to PHP, for example).

The Plugin Directory UI can of course display that as "Tested up to PHP" for clarity, like on the screenshot above.

#3 @aaroncampbell
15 months ago

Thanks for the added links @SergeyBiryukov, and I agree that Tested PHP is probably better in order to be consistent with the newer naming preferences. Displaying "Tested up to PHP" as the user facing message is probably preferred but if someone has a better suggestion I'm fine with anything we think users can reasonably understand.

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

15 months ago

This ticket was mentioned in Slack in #core by mike. View the logs.

15 months ago

#6 @mikeschroder
15 months ago

I especially like the idea of automatically populating PHP compatibility information based on what WP.org knows about active plugins, their versions, and sites that are using them successfully.

That stands to be a pretty good measurement of what users consider to be "working" properly.

This ticket was mentioned in Slack in #core-site-health by sergey. View the logs.

15 months ago

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

14 months ago

This ticket was mentioned in Slack in #core by timothybjacobs. View the logs.

14 months ago

Note: See TracTickets for help on using tickets.