Skip to content

Commit 96781d6

Browse files
authored
Merge pull request #880 from Automattic/GaryJones/fix-ci-879
2 parents d14c4c5 + fdd5a4c commit 96781d6

File tree

4 files changed

+11
-27
lines changed

4 files changed

+11
-27
lines changed

.github/workflows/basics.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
run: composer validate --no-check-all --strict
4343

4444
- name: 'Composer: adjust dependencies'
45-
# Using PHPCS `master` as an early detection system for bugs upstream.
46-
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"dev-master" --no-interaction
45+
# Using PHPCS `3.x` as an early detection system for bugs upstream.
46+
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"3.x-dev" --no-interaction
4747

4848
# Install dependencies and handle caching in one go.
4949
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
@@ -74,17 +74,8 @@ jobs:
7474
pattern: ".phpcs.xml.dist"
7575
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"
7676

77-
# Notes:
78-
# - PHPUnit 9.5 (which will be installed in this job) doesn't ship XSD files further back than 8.5.
79-
# - PHPUnit 9.3 introduced some new configuration options and deprecated the old versions of those.
80-
# For cross-version compatibility with older PHPUnit versions, those new config options cannot be used yet,
81-
# which is why the PHPUnit 9 validation is done against the PHPUnit 9.2 schema.
82-
- name: "Validate PHPUnit config for use with PHPUnit 8"
83-
uses: phpcsstandards/xmllint-validate@v1
84-
with:
85-
pattern: "phpunit.xml.dist"
86-
xsd-file: "vendor/phpunit/phpunit/schema/8.5.xsd"
87-
77+
# Note: PHPUnit 9.3 introduced some new configuration options and deprecated the old versions of those.
78+
# For cross-version compatibility, the validation is done against the PHPUnit 9.2 schema.
8879
- name: "Validate PHPUnit config for use with PHPUnit 9"
8980
uses: phpcsstandards/xmllint-validate@v1
9081
with:

.github/workflows/quicktest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
strategy:
2727
matrix:
2828
include:
29-
- php: '5.4'
29+
- php: '7.4'
3030
dependencies: 'stable'
31-
- php: '5.4'
31+
- php: '7.4'
3232
dependencies: 'lowest'
3333

3434
- php: 'latest'

.github/workflows/test.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
strategy:
3030
matrix:
31-
php: ['5.4', 'latest', '8.5']
31+
php: ['7.4', 'latest', '8.5']
3232

3333
name: "Lint: PHP ${{ matrix.php }}"
3434
continue-on-error: ${{ matrix.php == '8.5' }}
@@ -64,20 +64,13 @@ jobs:
6464
# - php: The PHP versions to test against.
6565
# - dependencies: The PHPCS dependencies versions to test against.
6666
# IMPORTANT: test runs shouldn't fail because of PHPCS being incompatible with a PHP version.
67-
# - PHPCS will run without errors on PHP 5.4 - 7.4 on any supported version.
68-
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors, and we require a higher minimum version.
69-
# - PHP 8.1 needs PHPCS 3.6.1+ to run without errors, but works best with 3.7.1+, and we require at least this minimum version.
7067
# - PHP 8.2, 8.3 and 8.4 need PHPCS 3.8.0+ to run without errors (though the errors don't affect the tests).
7168
matrix:
72-
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
69+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
7370
dependencies: ['lowest', 'stable']
7471

7572
include:
7673
# Test against dev versions of all dependencies with select PHP versions for early detection of issues.
77-
- php: '5.4'
78-
dependencies: 'dev'
79-
- php: '7.0'
80-
dependencies: 'dev'
8174
- php: '7.4'
8275
dependencies: 'dev'
8376
- php: '8.4'
@@ -117,7 +110,7 @@ jobs:
117110
if: ${{ matrix.dependencies == 'dev' }}
118111
run: >
119112
composer require --no-update --no-scripts --no-interaction
120-
squizlabs/php_codesniffer:"dev-master"
113+
squizlabs/php_codesniffer:"3.x-dev"
121114
phpcsstandards/phpcsutils:"dev-develop"
122115
phpcsstandards/phpcsextra:"dev-develop"
123116
sirbrillig/phpcs-variable-analysis:"2.x"

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.4",
19+
"php": ">=7.4",
2020
"phpcsstandards/phpcsextra": "^1.4.0",
2121
"phpcsstandards/phpcsutils": "^1.1.0",
2222
"sirbrillig/phpcs-variable-analysis": "^2.12.0",
@@ -28,7 +28,7 @@
2828
"php-parallel-lint/php-console-highlighter": "^1.0.0",
2929
"phpcompatibility/php-compatibility": "^9",
3030
"phpcsstandards/phpcsdevtools": "^1.2.3",
31-
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7 || ^8 || ^9"
31+
"phpunit/phpunit": "^9"
3232
},
3333
"config": {
3434
"allow-plugins": {

0 commit comments

Comments
 (0)