[wp-trac] [WordPress Trac] #51139: Allow "tested up to" PHP version statement for plugins & themes

WordPress Trac noreply at wordpress.org
Tue Aug 25 13:30:57 UTC 2020


#51139: Allow "tested up to" PHP version statement for plugins & themes
---------------------------+-----------------------------
 Reporter:  aaroncampbell  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 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 [https://make.wordpress.org/core/2020/08/24/proposal-
 dropping-support-for-old-php-versions-via-a-fixed-schedule/ 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:
 '''Core'''
 - Plugin header parser changes for "tested up to" PHP version statement.
 - Warnings added that use this header (mockups needed)

 '''Meta'''
 - Plugin readme parser changes for "tested up to" PHP version statement.
 Source location:
 https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/plugins/plugin-directory/readme
 - Plugins API changes. Source location:
 https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/plugins/plugin-directory/standalone
 - Logic added to track "tested up to PHP" for plugins/themes not
 specifying it

 '''Plugin directory'''
 - Show tested up to PHP version on plugins page. Source location:
 https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/themes/pub/wporg-plugins/template-parts/plugin.php (Simple
 mockup attached)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51139>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list