Opened 3 years ago
Closed 3 years ago
#54425 closed defect (bug) (fixed)
Exclude plugins and themes from PHP Compatibility scans
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
Currently, the wp-content/plugins
, wp-content/themes
, and wp-content/mu-plugins
directories are not excluded in the PHP compatibility check ruleset in trunk
.
These are excluded for PHPCS scans, and should also be excluded for compatibility scans.
Attachments (1)
Change History (13)
#2
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Eh.. @desrosj This was originally set up like that by design as, while those files do not have to comply with the WP coding standards, we do want to make sure they are PHP cross-version compatible and won't crash sites.
The PHPCompatibility scan has a different remit than the WPCS scan, so IMO, this commit should be reverted.
#3
@
3 years ago
I think the only file which is now not checked anymore is wp-content/plugins/hello.php
. Everything else that's bundled with WordPress is still checked.
#4
@
3 years ago
I came across this when I had several plugins from WordPress.org installed and the scan was displaying a lot of errors. The plugins are not a part of Core, so I figured the Core ruleset could exclude them.
Plugins don't need to support the same PHP versions as WordPress since they can define their own lower limit (WooCommerce only supports PHP 7.0+, for example), so this could result in some very noisy scan results when trying to verify WordPress Core is compatible with the current ruleset.
Happy to revert if there's consensus, but as far as I know, the thinking has always been to only run scans on files included in the final WordPress package.
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
This ticket was mentioned in PR #1919 on WordPress/wordpress-develop by desrosj.
3 years ago
#6
…CS workflows.
This ensures that the cache is reset when changes are made to the rulesets and not the composer.json
file.
Trac ticket:
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
3 years ago
#10
@
3 years ago
- Keywords dev-feedback added
- Type changed from defect (bug) to task (blessed)
Reclassifying to task to let it stay in the beta cycle. Will review after Beta 1 ships.
In 52148: