Skip to content

Bump mediawiki-codesniffer to ^52 to unblock Composer - #938

Merged
JeroenDeDauw merged 1 commit into
masterfrom
fix/ci-codesniffer-advisory
Sep 7, 2026
Merged

Bump mediawiki-codesniffer to ^52 to unblock Composer#938
JeroenDeDauw merged 1 commit into
masterfrom
fix/ci-codesniffer-advisory

Conversation

@JeroenDeDauw

Copy link
Copy Markdown
Member

Composer refuses to install the phpcs 3.6.2 that codesniffer 39.0.0 pins, because of advisory
PKSA-rdkp-vv9z-mjkg. Only the Code style and PHPStan jobs were affected, as they are the ones
running Composer inside the extension directory. Codesniffer 52 needs PHP 8.3 and the plugin
that registers PHPCSExtra.

Of the new findings, five sniffs are excluded, each mirroring an exclusion already in phpcs.xml:
Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace (12),
Generic.CodeAnalysis.AssignmentInCondition (11), Universal.WhiteSpace.CommaSpacing (8),
Squiz.WhiteSpace.FunctionOpeningBraceSpace.SpacingAfter (3) and
MediaWiki.WhiteSpace.SpaceAfterClosure.NoWhitespaceAfterArrow (2). Two are fixed in tests: an
implicit nullable parameter type and an assertEquals over two counts. phpcs no longer sniffs
JavaScript, where its tokenizer misreads the nesting in JQueryLeafletTest.js.

AI-authored — Claude Code, Opus 5 (max); detailed spec from @JeroenDeDauw, no redirections; diff not yet human-reviewed; phpcs run to green locally against a PHP 8.3-pinned install, everything else on CI.

Composer refuses to install the phpcs 3.6.2 that codesniffer 39.0.0 pins, because of advisory
PKSA-rdkp-vv9z-mjkg. Only the Code style and PHPStan jobs were affected, as they are the ones
running Composer inside the extension directory. Codesniffer 52 needs PHP 8.3 and the plugin
that registers PHPCSExtra.

Of the new findings, five sniffs are excluded, each mirroring an exclusion already in phpcs.xml:
Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace (12),
Generic.CodeAnalysis.AssignmentInCondition (11), Universal.WhiteSpace.CommaSpacing (8),
Squiz.WhiteSpace.FunctionOpeningBraceSpace.SpacingAfter (3) and
MediaWiki.WhiteSpace.SpaceAfterClosure.NoWhitespaceAfterArrow (2). Two are fixed in tests: an
implicit nullable parameter type and an assertEquals over two counts. phpcs no longer sniffs
JavaScript, where its tokenizer misreads the nesting in JQueryLeafletTest.js.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review September 7, 2026 16:10
@JeroenDeDauw
JeroenDeDauw merged commit 3488148 into master Sep 7, 2026
8 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the fix/ci-codesniffer-advisory branch September 7, 2026 16:10
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.

1 participant