Skip to content

Commit 68e6456

Browse files
committed
ci: simplify PHPCS workflow and update PHPUnit version constraints
1 parent 4130f8e commit 68e6456

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/cs.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,19 @@ jobs:
3030
tools: cs2pr
3131
coverage: none
3232

33-
- name: 'Composer: set up PHPCS dependencies'
34-
run: |
35-
composer require --no-update squizlabs/php_codesniffer wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp dealerdirect/phpcodesniffer-composer-installer
36-
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
37-
3833
# Install dependencies and handle caching in one go.
3934
# @link https://github.com/marketplace/actions/install-composer-dependencies
4035
- name: Install Composer dependencies
4136
uses: "ramsey/composer-install@v3"
4237

4338
- name: 'Run Composer Update'
4439
run: |
45-
composer update
40+
composer update -W --ignore-platform-req=php
4641
4742
# Check the code-style consistency of the PHP files.
4843
- name: Check PHP code style
4944
continue-on-error: true
5045
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
5146

5247
- name: Show PHPCS results in PR
53-
run: cs2pr --graceful-warnings ./phpcs-report.xml
48+
run: cs2pr --graceful-warnings ./phpcs-report.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dealerdirect/phpcodesniffer-composer-installer": "^1",
3131
"phpcompatibility/phpcompatibility-wp": "^2",
3232
"yoast/phpunit-polyfills": "^3",
33-
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11 || ^12"
33+
"phpunit/phpunit": "^9 || ^10 || ^11 || ^12"
3434
},
3535
"config": {
3636
"allow-plugins": {

0 commit comments

Comments
 (0)