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

WordPress Trac noreply at wordpress.org
Thu Jul 6 22:24:54 UTC 2017


#40934: Allow PHP version requirements for plugins & themes
----------------------------+---------------------------------
 Reporter:  joostdevalk     |       Owner:  joostdevalk
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  4.9
Component:  Plugins         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:  ui, administration
----------------------------+---------------------------------

Comment (by jrf):

 Probably not a surprise to anyone who knows me, but I'm all for this!

 It's also been discussed for the TGM Plugin Activation library as a
 potential addition for the 3.0 version, so getting this supported by core
 would be great!

 I noticed the [https://wordpress.org/plugins/php-compatibility-checker/ WP
 Engine PHP 7 Compatibility checker plugin] has been mentioned already and
 while interesting, it is very much aimed at PHP 7+ and obviously not
 something for end-users who hardly know what PHP is.

 What some people may not realize however, is that the plugin is but a thin
 shell around (an out of date version of) the
 [https://github.com/wimg/PHPCompatibility PHPCompatibility] sniff library
 for PHPCS which can test for compatibility with a range of PHP versions
 and contains checks for PHP cross-version compatibility for PHP 5.0 all
 the way up to PHP nightly.
 It is actively being maintained (me being one of the maintainers) and
 contributions as well as bug reports or feature requests are very welcome.

 It might be worth thinking about potentially creating an automated work-
 flow where commits to the plugin repository - or probably better: tagged
 releases at the moment of tagging - are checked for compatibility with
 minor PHP versions to determine what the minimum PHP version should be.

 The tool will yield some false positives for code typically used to
 provide backward-compatibility for older PHP versions, but I imagine we
 can figure out a solution to that.

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


More information about the wp-trac mailing list