[wp-trac] [WordPress Trac] #40934: Allow PHP version requirements for plugins & themes

WordPress Trac noreply at wordpress.org
Tue Jun 6 20:34:48 UTC 2017

#40934: Allow PHP version requirements for plugins & themes
 Reporter:  joostdevalk     |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  4.9
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:  dev-feedback
  Focuses:                  |
 Not all plugins can work on PHP 5.2, like WordPress core currently does.
 Not all plugin developers ''want'' to support PHP 5.2, like core does. As
 a project, WordPress would like to move forward and have people on more
 recent PHP versions. One of the ways to reach that goal would be to show
 them that they cannot install a certain plugin or theme because their
 install does not meet the required criteria.

 As such, I'm proposing to allow plugins and themes to have a minimum PHP
 version requirement. Not a maximum, just a minimum. This minimum version
 requirement should not mean that plugins should not be shown in the new
 plugins screen, for instance, instead, they should be shown but
 "disabled", with links to Wordpress.org pages explaining why, and how to
 upgrade their PHP.

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

 - Plugin header parser changes for minimum PHP version requirement.
 - Disallow activating incompatible plugins from plugins list. Mockups
 - Add new plugins screen changes for plugins whose criteria do not match.
 Mockup attached.
 - Check plugin header on manual plugins installation to prevent fatal
 errors. Mockup required for error.

 - Plugin readme parser changes for minimum PHP version requirement. Source
 - Plugins API changes. Source location:

 '''Plugin directory'''
 - Show minimum required PHP version on plugins page. Source location:
 /wp-content/themes/pub/wporg-plugins/template-parts/plugin.php Mockups
 - (Optional) Allow filtering plugin directory. Mockups required.
 - (Optional) Report PHP version usage per plugin’s users. Mockups

 '''WordPress dot org / Codex'''
 - Create pages on how to upgrade PHP, preferably with links to specific
 instructions for specific hosts

 If this gets "blessed" I'll proceed to make individual smaller tickets for
 the individual changes.

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

More information about the wp-trac mailing list