Skip to content

Use the PHPUnit plugin's coding style and check it in CI - #71

Merged
alies-dev merged 4 commits into
masterfrom
ci/coding-style
Nov 11, 2026
Merged

alies-dev merged 4 commits into
masterfrom
ci/coding-style

Conversation

@alies-dev

Copy link
Copy Markdown
Contributor

Context

The plugin was formatted with Human Made's PHPCS standard, run from a separate tools/phpcs install, and CI never checked it. The PHPUnit plugin uses PHP-CS-Fixer with a short config (PER-CS 3.0 plus a few import rules) and checks it in CI. This brings the same setup here; the next step is running Psalm on the plugin in CI (#50).

Solution

  • .php-cs-fixer.php is the PHPUnit plugin's config, pointed at Plugin.php, test.php, stubs/ and tests/. composer cs-check / composer cs-fix run it; PHPCS, its ruleset and tools/phpcs are removed.
  • The code is reformatted in a single commit with no other changes, listed in .git-blame-ignore-revs so git blame (and GitHub's blame view) skips it. Merge with a merge commit (not squash/rebase) so that hash stays valid.
  • .editorconfig now uses 4 spaces, as PER-CS does; JSON keeps tabs.
  • The workflow (renamed ci.yml) gets a "Code style" job and follows the PHPUnit plugin's CI: one run per pull request instead of two (push + pull_request), a new push cancels the previous run, Composer cache, a weekly scheduled run and manual dispatch.
  • composer test runs PHPUnit (it called Codeception, which isn't installed).

@alies-dev alies-dev added the release:internal The PR will be included in 'Internal changes' section of the release notes label Nov 11, 2026
@alies-dev alies-dev self-assigned this Nov 11, 2026
@alies-dev
alies-dev merged commit 592e9e9 into master Nov 11, 2026
4 checks passed
@alies-dev
alies-dev deleted the ci/coding-style branch November 11, 2026 14:24
@alies-dev
alies-dev restored the ci/coding-style branch November 11, 2026 14:24
@alies-dev
alies-dev deleted the ci/coding-style branch November 11, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:internal The PR will be included in 'Internal changes' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant