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

WordPress Trac noreply at wordpress.org
Fri May 31 11:20:09 UTC 2019


#40934: Allow PHP version requirements for plugins & themes
-------------------------------------------------+-------------------------
 Reporter:  joostdevalk                          |       Owner:
                                                 |  joostdevalk
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Plugins                              |     Version:
 Severity:  major                                |  Resolution:
 Keywords:  dev-feedback needs-patch servehappy  |     Focuses:  ui,
  needs-unit-tests                               |  administration
-------------------------------------------------+-------------------------
Description changed by SergeyBiryukov:

Old description:

> 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:
>
> '''Core'''
> - Plugin header parser changes for minimum PHP version requirement.
> - Disallow activating incompatible plugins from plugins list. Mockups
> required.
> - 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.
>
> '''Meta'''
> - Plugin readme parser changes for minimum PHP version requirement.
> 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
>
> '''Plugin directory'''
> - Show minimum required 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 Mockups
> required.
> - (Optional) Allow filtering plugin directory. Mockups required.
> - (Optional) Report PHP version usage per plugin’s users. Mockups
> required.
>
> '''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.

New description:

 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:

 '''Core'''
 - Plugin header parser changes for minimum PHP version requirement.
 - Disallow activating incompatible plugins from plugins list. Mockups
 required.
 - 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.

 '''Meta'''
 - Plugin readme parser changes for minimum PHP version requirement. 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

 '''Plugin directory'''
 - Show minimum required 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 Mockups
 required.
 - (Optional) Allow filtering plugin directory. Mockups required.
 - (Optional) Report PHP version usage per plugin’s users. Mockups
 required.

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

 Related tickets:
 [[TicketQuery(id=43986|43987|43989|43992|44350|46599|46613|46938)]]

--

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


More information about the wp-trac mailing list