Fix failing CI: exclude CLI/ from VIP-Go RestrictedExtendClasses rule - #6
Merged
masteradhoc merged 1 commit intoSep 24, 2026
Conversation
The `WordPressVIPMinimum.Classes.RestrictedExtendClasses` rule flags `Two_Factor_CLI_Command extends WP_CLI_Command`, recommending `WPCOM_VIP_CLI_Command` instead. That base class only exists on VIP-managed hosting, so it doesn't apply to a generic wordpress.org plugin -- WP_CLI_Command is the correct base class here. This warning is currently failing the "Lint PHP & PHP Compatibility checks" CI job, since the repo's `composer lint` script runs plain phpcs with no warning-severity suppression. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Owner
|
Thank you @georgestephanis ! |
masteradhoc
merged commit Sep 24, 2026
c19e248
into
masteradhoc:233-add-wpcli-foundation
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix-up for the CI failure on WordPress#905.
What's broken
The
Lint PHP & PHP Compatibility checks.job fails on:WPCOM_VIP_CLI_Commandonly exists on VIP-managed hosting, so it doesn'tapply here --
WP_CLI_Commandis the correct base class for awordpress.org-distributed plugin. It's a false positive for this context,
but since the repo's
composer lintscript runs plainphpcswith nowarning-severity suppression, the warning fails the whole job.
The fix
Adds a scoped
<exclude-pattern>for that one rule onCLI/*.php, matchingthe existing convention already used in
phpcs.xml.distfortests/*.php.Verified locally:
./vendor/bin/phpcs CLI/class-two-factor-cli-command.php-- exit 1 (the warning) before the fix, exit 0 after../vendor/bin/phpcsrun across the repo -- clean, no other regressions.No functional code changed -- just the lint ruleset.
A couple of the smaller review nits from George's local review of WordPress#905 are
worth a look too, but are judgment calls left to you rather than something
this PR touches:
CLI/is uppercase, inconsistent with lowercaseproviders//settings//includes/elsewhere in the plugin.--porcelainflag for scriptingstatus/backup-codes generate.🤖 Generated with Claude Code