Repository navigation
Use the PHPUnit plugin's coding style and check it in CI - #71
Merged
Merged
Conversation
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.
Context
The plugin was formatted with Human Made's PHPCS standard, run from a separate
tools/phpcsinstall, 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.phpis the PHPUnit plugin's config, pointed atPlugin.php,test.php,stubs/andtests/.composer cs-check/composer cs-fixrun it; PHPCS, its ruleset andtools/phpcsare removed..git-blame-ignore-revssogit blame(and GitHub's blame view) skips it. Merge with a merge commit (not squash/rebase) so that hash stays valid..editorconfignow uses 4 spaces, as PER-CS does; JSON keeps tabs.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 testruns PHPUnit (it called Codeception, which isn't installed).