[wp-trac] [WordPress Trac] #48966: Add PHPCompatibility check to all branches

WordPress Trac noreply at wordpress.org
Fri Jan 17 20:25:59 UTC 2020


#48966: Add PHPCompatibility check to all branches
------------------------------+-------------------------------
 Reporter:  johnbillion       |       Owner:  desrosj
     Type:  task (blessed)    |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:  wontfix
 Keywords:                    |     Focuses:  coding-standards
------------------------------+-------------------------------
Changes (by desrosj):

 * keywords:  needs-patch =>
 * status:  assigned => closed
 * resolution:   => wontfix
 * milestone:  Future Release =>


Comment:

 I did some experimenting with this today. Here are my findings.

 I ran the compatibility checks on two branches: 5.2 and 4.1.

 **5.2:** Constraints of PHP 5.6-7.3 returned the following:

 `A TOTAL OF 88 SNIFF VIOLATIONS WERE FOUND IN 18 SOURCES`

 **4.1:** Constraints of PHP 5.2-5.6 returned the following:

 `A TOTAL OF 162 SNIFF VIOLATIONS WERE FOUND IN 38 SOURCES`

 When [46290] was committed, it included some false positive fixes (and
 still is not passing). Many of those false positives exist in earlier
 branches, so simply backporting is not enough to make this work. We could
 work to adjust the rule set to exclude certain tests and achieve a passed
 compatibility scan, but that defeats the purpose of adding a compatibility
 scan. We could also add the scan to the allowed failures in Travis
 (similar to `trunk` and 5.3), but that will also defeat the purpose
 because realistically no one will look at the summary of that job and
 compare the scan results.

 Fixing these would create churn (38 files in the 4.1 branch, for example)
 which would greatly increase the size of the next security update for the
 older branches.

 While I love the idea, I am going to close this out as a `wontfix` because
 I don't think this is worth adding the additional risk to the next auto
 update for older branches or the required level of effort. If someone else
 can justify the level of effort here and would like to work on this, feel
 free to reopen with an explanation and tackle.

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


More information about the wp-trac mailing list