Skip to:
Content

BuddyPress.org

Opened 4 months ago

Closed 4 months ago

#8124 closed enhancement (fixed)

Reintroduce PHP linting

Reported by: boonebgorges Owned by: netweb
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.

Change History (3)

#1 @boonebgorges
4 months ago

In 12424:

Reintroduce PHP linting to automated QA.

See #8124, #7997.

#2 @boonebgorges
4 months ago

In 12425:

PHP linting should only look in /src/.

Specifically, the /vendor/ directory should be excluded, as BP doesn't
currently load Composer libraries in the build.

See #8124.

#3 @boonebgorges
4 months ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.