[wp-trac] [WordPress Trac] #46152: Add PHPCompatibility checks to test suite

WordPress Trac noreply at wordpress.org
Mon Sep 23 14:43:40 UTC 2019


#46152: Add PHPCompatibility checks to test suite
-------------------------------------+-------------------------------
 Reporter:  desrosj                  |       Owner:  (none)
     Type:  task (blessed)           |      Status:  new
 Priority:  normal                   |   Milestone:  5.3
Component:  Build/Test Tools         |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  coding-standards
-------------------------------------+-------------------------------

Comment (by jrf):

 @desrosj Thanks for updating the patch.


 > I added a compat:detailed script to easily display a full report.
 > I moved the command-line directives into the configuration file. I will
 have a follow up patch shortly for the other commands to commit
 separately.

 Thanks for updating this, but you've taken it a bit too far now.

 In my opinion, the `--report=summary,source` should ''**never**'' be added
 to a custom project ruleset.
 I didn't list it above for a reason 😉

 Most people don't know anything but the default `full` report from PHPCS
 and wouldn't know how to change it.

 While running a Composer script, it's fine for a custom report setting to
 be used, but when people run `phpcs` from the command-line, they should -
 by default - get the `full` report.

 Principle of least astonishment et al.

 So, please move the `--report` setting back to the Composer scripts and
 out of the ruleset (for both patches).



 > I changed the commands to contain the @php prefix. #47853 was already
 open with this suggestion and the change for other commands landed in
 [46187].

 👍🏻

 > class-snoopy.php: I have removed the exclusion. I looked back at when
 PHP 7.2 support was tackled, and it appears the decision was made to skip
 this file because the file is deprecated. If you feel the level of effort
 is low for this, I have no strong feelings against fixing this. Let's open
 a new ticket to tackle that.

 👍🏻


 > For the double underscore functions, let's open a separate ticket for
 discussion and feedback.
 > Moving forward, I think individual tickets for like compatibility
 updates may be best to ensure each gets properly tested.

 I agree 👍🏻


 General note: I think it would be good if either of us would open the
 above mentioned tickets and list them here for reference before this
 ticket is closed.

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


More information about the wp-trac mailing list