[wp-trac] [WordPress Trac] #43992: Prevent activation of a plugin if its required PHP version is too high

WordPress Trac noreply at wordpress.org
Thu Mar 21 19:02:40 UTC 2019


#43992: Prevent activation of a plugin if its required PHP version is too high
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  desrosj
     Type:  task (blessed)                       |      Status:  reviewing
 Priority:  high                                 |   Milestone:  5.2
Component:  Plugins                              |     Version:
 Severity:  major                                |  Resolution:
 Keywords:  needs-unit-tests servehappy dev-     |     Focuses:
  feedback has-patch needs-testing 2nd-opinion   |
-------------------------------------------------+-------------------------

Comment (by afragen):

 Replying to [comment:45 SergeyBiryukov]:
 > * I'd like to see specific error messages for not meeting minimum WP
 version requirement vs. PHP version, rather than "WordPress and/or PHP".
 `validate_plugin_requirements()` could return `WP_Error` on error, I agree
 with @TimothyBlynJacobs in comment:33 here. That can probably be adjusted
 after beta though.

 It was my plan to fix this during beta. Do you want me to try and do it
 before commit?

 > * Introducing `wp_is_*_compatible()` wrappers doesn't seem to bring a
 huge benefit at a glance, as there are only two or three of these checks
 in core. Maybe it will be easier to see once the other instances are
 updated to use the wrappers. I agree they should be prefixed with `wp_`,
 just in case.
 >
 Search core for `$compatible_wp` and `$compatible_php`. It will also
 become most beneficial if/when the decision is made to require the
 `Requires at least` and `Requires PHP` headers in the readme. Then all
 plugin will be appropriately tested as opposed to allowing those without
 the headers to pass on through as valid.

 > Looks good otherwise.

 Thanks.

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


More information about the wp-trac mailing list