[wp-trac] [WordPress Trac] #43987: Block plugins from updating if required PHP version is not supported

WordPress Trac noreply at wordpress.org
Fri May 25 23:02:01 UTC 2018


#43987: Block plugins from updating if required PHP version is not supported
---------------------------------------------------+---------------------
 Reporter:  schlessera                             |       Owner:  (none)
     Type:  task (blessed)                         |      Status:  new
 Priority:  normal                                 |   Milestone:  5.0
Component:  Plugins                                |     Version:
 Severity:  normal                                 |  Resolution:
 Keywords:  needs-unit-tests servehappy has-patch  |     Focuses:
---------------------------------------------------+---------------------

Comment (by SergeyBiryukov):

 I think this should be handled on the API level, like the WordPress
 version check.

 The API currently checks the `requires` header and only serves updates to
 WordPress versions that support them. If the author bumps the header,
 older WP versions won't get the update. It should do the same for
 `requires_php` header, which would need a Meta Trac ticket.

 This would not prevent plugin authors from being able to release security
 updates, which was an initial concern here.

 If plugin versions 1.x and 2.x have different PHP or WordPress
 requirements, the author can release both 1.x.y and 2.x.z, and the API
 would serve them appropriately to the sites meeting the requirements.

 If the goal is not just to block updates to incompatible versions, but
 also to give users an incentive to upgrade PHP, then some UI changes in
 core might be needed. The patches seem like a good start, would need
 design feedback though. Perhaps we'd want to handle WordPress version
 checks in a similar way, for consistent experience and as an incentive to
 update WordPress to the latest version?

 Apparently the updates endpoint, unlike `query_plugins`, does not
 currently return the `requires_php` header. That should be added first to
 avoid introducing multiple external requests.

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


More information about the wp-trac mailing list