Opened 5 years ago
Closed 5 years ago
#8124 closed enhancement (fixed)
Reintroduce PHP linting
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Cc: |
Description
From @jrf in https://buddypress.trac.wordpress.org/ticket/7997#comment:8:
While I - of course - fully support adding PHPCompatibilityWP to the QA toolset, it is not a replacement for linting code.
When PHPCompatibility encounters parse errors which are not typically to do with PHP cross-version compatibility, it will ignore them and not notify you of these.
Also, in case of parse errors, the results of PHPCompatibility may not be reliable as the file may be tokenized incorrectly by PHP/PHPCS because of the parse errors.
I'd strongly recommend using php -l against at least the lowest and highest PHP version, if not lowest/highest of each PHP major in addition to using PHPCompatibility.
Let's reintroduce.
In 12424: