Skip to content

PHPCS: Exclude the vendored adhocore/php-jwt library from linting - #797

Open
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:phpcs/exclude-adhocore-php-jwt
Open

PHPCS: Exclude the vendored adhocore/php-jwt library from linting#797
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:phpcs/exclude-adhocore-php-jwt

Conversation

@obenland

@obenland obenland commented Aug 13, 2026

Copy link
Copy Markdown
Member

PHPCS reports 14 WordPress.Security.EscapeOutput.ExceptionNotEscaped violations (plus assorted style noise) against api.wordpress.org/public_html/dotorg/trac/pr/adhocore-php-jwt/ — the MIT-licensed adhocore/php-jwt library, which we shouldn't hold to WordPress coding standards, matching the existing excludes for plugin-directory/libs/, theme-directory/lib/, and wpf-stripe/stripe-php/.

The exclude is scoped to the WordPress ruleset rather than global: this copy is not pristine upstream — it carries local patches (991cf85 for PHP 8.4 implicit-nullable deprecations, 6f3fdbc for a private-key check) — so PHPCompatibilityWP deliberately stays active on it, preserving the signal that caught the 8.4 breakage in these files. Verified with a canary that deprecated constructs in the directory are still flagged while the WordPress-ruleset violations are silenced.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings August 13, 2026 00:45
@github-actions

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository PHPCS ruleset to stop linting a vendored third-party JWT library that’s copied into the codebase verbatim, aligning this with existing exclusions for other bundled dependencies.

Changes:

  • Adds a PHPCS <exclude-pattern> for api.wordpress.org/public_html/dotorg/trac/pr/adhocore-php-jwt/ to avoid reporting violations in third-party code.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…ss ruleset.

It's a third-party MIT-licensed library, so coding standards violations
reported against it are noise we won't fix. The exclude is scoped to
the WordPress ruleset rather than global, because the copy carries
local patches (PHP 8.4 compatibility, a private-key check fix) —
PHPCompatibilityWP stays active on it so the next PHP version bump
still gets flagged, as it was for 8.4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@obenland
obenland force-pushed the phpcs/exclude-adhocore-php-jwt branch from 0ef4b2f to 1f0084f Compare August 13, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants