[wp-meta] [Making WordPress.org] #3791: Consider bumping pre-commit checker on plugins to PHP 7.1

Making WordPress.org noreply at wordpress.org
Mon Oct 7 14:54:35 UTC 2019


#3791: Consider bumping pre-commit checker on plugins to PHP 7.1
------------------------------+---------------------
 Reporter:  Ipstenu           |       Owner:  (none)
     Type:  defect            |      Status:  closed
 Priority:  high              |   Milestone:
Component:  Plugin Directory  |  Resolution:  fixed
 Keywords:                    |
------------------------------+---------------------

Comment (by giuseppe.mazzapica):

 Replying to [comment:27 dd32]:
 > I understand where you're coming from, but IMHO running the branch prior
 to current stable is far more than ideal than either running PHP 7.0
 linting or no linting at all.

 More ideal than running PHP 7.0 linting for sure. Andrey already said that
 quite clearly.

 Better than no linting at all, not so sure. At least if by "linting" we
 mean running `php -l`.

 PHP parser (https://github.com/nikic/PHP-Parser) runs on PHP 7.0+ and it
 is able to parse from PHP 5.2 to the most recent version of PHP and, among
 other things, detect errors. It is reliable and kept up-to-date,
 considering its maintainer is one of the most active core PHP developers.

 Using PHP parser to check code would allow to check syntax for versions
 more recent than the running version, and could also provide a better
 feedback in case of failure.

 On top of that, it would be possible to implement an automatic detection
 of the minimum required PHP version, something very useful now that
 WordPress is able to prevent plugin installation in case user's PHP
 version is too old.

 Not to mention the possibility to use it to obtain interesting statistics
 about PHP code used by plugins, that could be used to inform future
 decisions or the possibility to switch to a PHP-7-only parser when WP
 would abandon PHP 5.

 Which means there's here room to improve both developers' and users'
 experience.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/3791#comment:29>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list