Repository navigation
Conversation
wp-coding-standards/wpcs 2.3.0 has a high-severity arbitrary code execution advisory, fixed in 3.4.1. humanmade/coding-standards 1.x pins WPCS 2.x, so move to 2.5, which needs WPCS 3. The new standards need PHP 8.2 to run. The plugin still supports PHP 7.2: the ruleset's testVersion still checks for it. The new sniffs add PSR-12 rules. phpcbf applied most of the fixes. The Flags methods get an explicit `public`, which is what PHP already assumed, and admin-bar.php imports the Ajax namespace instead of the function so its imports satisfy both ordering sniffs. Co-Authored-By: Claude <noreply@anthropic.com>
The lint toolchain already needs PHP 8.2, so raise the plugin's own minimum to match: the plugin header, composer.json and the ruleset's testVersion. Pin config.platform.php to 8.2 so dependency resolution and local tool runs use the same PHP. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Oct 16, 2026
Open
tomjn
approved these changes
Oct 16, 2026
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.
The locked WordPress Coding Standards version has a high-severity arbitrary code execution advisory. It is the only open Dependabot alert on this repo.1 The package is a dev dependency, so it affects anyone who runs the linter, not sites that run the plugin.
The fixed release needs version 2 of the Human Made coding standards, and those need PHP 8.2 to run. This PR also raises the plugin's own minimum PHP version to 8.2, so the plugin and its tooling require the same version.
What changed
functionin closures, and no blank line before a class's closing brace. phpcbf applied all of them.Flagsnow saypublic. PHP already treated them as public, so callers see no change.Ajaxnamespace instead of the single function. This keeps the import order valid for both ordering rules in the new standards, which conflict for function imports.4Test plan
composer validatepasses andcomposer auditreports no advisories.masteryet.Not checked: I did not load the plugin in WordPress. Apart from the version bump, the diff changes formatting, adds visibility keywords that change nothing, and changes one namespaced function call.
Risk: a site on PHP older than 8.2 that updates the plugin can no longer activate it. Mention this in the release notes for the next version.
Merge #26 first. It switches CI to PHP 8.2, which this lock needs. #25 (Cookie scope) needs a rebase after this PR merges, because its new code uses the old return type spacing.
Footnotes
wp-coding-standards/wpcs>= 0.14.1, < 3.4.1, alert 1 at https://github.com/humanmade/wp-flags/security/dependabot/1. ↩humanmade/coding-standards^1.2→^2.5, andwp-coding-standards/wpcs2.3.0 → 3.4.1.minimum-stabilityis stilldev, so some sniff packages lock to dev branches, assquizlabs/php_codesnifferalready did. ↩Requires PHP: 8.2in theplugin.phpheader,"php": ">=8.2"incomposer.json,testVersion8.2-inphpcs.ruleset.xml, andconfig.platform.phppinned to8.2. ↩PSR12.Files.FileHeader.IncorrectOrderwants class imports before function imports.PSR2R.Namespaces.UseInAlphabeticalOrderwants all imports in alphabetical order. The call is nowAjax\get_toggle_url()ininc/admin-bar.php. ↩