Skip to content

Update the phpcs toolchain and fix the lint run - #3

Merged
obenland merged 4 commits into
trunkfrom
update/phpcs-toolchain
Oct 16, 2026
Merged

obenland merged 4 commits into
trunkfrom
update/phpcs-toolchain

Conversation

@obenland

@obenland obenland commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

The lint workflow has failed on every run since July, so #2 could not be checked by CI. composer install fails because the lockfile pins a wporg-mu-plugins build commit that no longer exists, and the fallback composer update wporg/* fails because wporg-repo-tools now requires dealerdirect/phpcodesniffer-composer-installer ^1.0 and PHPCompatibility 3.0 alpha, which conflict with the ^0.7.0 and * constraints here.

Changes

  • Drop the project's own pins on wpcs, PHPCompatibility and the installer plugin. repo-tools' setup action asks for this, since it now provides them. Allow alpha stability with prefer-stable, matching wporg-main-2022 and repo-tools itself.
  • Bump composer/installers to ^2.0, which removes a PHP 8.4 deprecation notice on every Composer run.
  • Refresh the lockfile: phpcs 3.13.6, wpcs 3.4.1, PHPCompatibility 10.0.0-alpha2, current repo-tools and mu-plugins builds.
  • Limit the CI fallback to composer update wporg/wporg-mu-plugins. The mu-plugins build branch is force-pushed on every merge, so its locked commit disappears within days. The old wporg/* fallback also pulled a newer repo-tools ruleset into the lint run each time that happened, which is how 45 violations appeared in files that passed in July. The lint does not use mu-plugins, so the standard now only changes when the lockfile does.
  • Ignore eslint.config.js, which update-configs now writes.
  • Fix the 45 violations the updated wporg standard reports in the theme. 42 were phpcbf formatting fixes (alignment, elseif, embedded PHP tags on their own lines). The editor script sets $in_footer explicitly, and the table of contents query ignores the slow meta query sniff, since the book only has a few dozen chapters.

Testing

composer install, composer exec update-configs, npm run lint:php and npm run lint:css all pass locally on PHP 8.4.

🤖 Generated with Claude Code

obenland and others added 2 commits October 16, 2026 11:52
wporg-repo-tools now requires phpcodesniffer-composer-installer ^1.0
and PHPCompatibility 3.0 alpha, so the pinned ^0.7.0 and the lockfile's
stale wporg-mu-plugins commit left `composer install` and the fallback
`composer update wporg/*` both failing in CI.

- Allow alpha stability with prefer-stable, as wporg-main-2022 does
- Bump the installer plugin to ^1.0 and composer/installers to ^2.0
- Refresh the lockfile: phpcs 3.13.6, PHPCompatibility 10 alpha 2,
  current repo-tools and mu-plugins builds
- Ignore eslint.config.js, which update-configs now generates

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
phpcbf handled the alignment, elseif and embedded PHP formatting. The
editor script now sets $in_footer explicitly, and the table of contents
query ignores the slow meta query sniff, since the book only has a few
dozen chapters.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 16:52

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

obenland and others added 2 commits October 16, 2026 11:57
The mu-plugins build branch is force-pushed on every merge, so the
locked commit disappears within days and `composer install` fails.
The fallback then updated every wporg/* package, which also pulled a
newer repo-tools ruleset into the lint run. Limit the fallback to
mu-plugins, which the lint does not use, so the standard only changes
when the lockfile does.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Its setup action asks projects to drop their own pins on wpcs,
php_codesniffer, PHPCompatibility and the installer plugin, so the
versions only move when repo-tools does.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
@obenland
obenland merged commit 7ffff78 into trunk Oct 16, 2026
1 check passed
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