Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer: up the minimum PHPCS version to 3.7.1 #742

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/basics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.md'
pull_request:

# Allow manually triggering the workflow.
workflow_dispatch:

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ jobs:
phpcs_version: 'dev-master'
wpcs_version: '2.3.*'
- php: '5.4'
phpcs_version: '3.5.5'
phpcs_version: '3.7.1'
wpcs_version: '2.3.*'

- php: 'latest'
phpcs_version: 'dev-master'
wpcs_version: '2.3.*'
- php: 'latest'
# PHPCS 3.6.1 is the lowest version of PHPCS which supports PHP 8.1.
phpcs_version: '3.6.1'
phpcs_version: '3.7.1'
wpcs_version: '2.3.*'

name: "QTest${{ matrix.phpcs_version == 'dev-master' && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"
Expand Down
37 changes: 5 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths-ignore:
- '**.md'
pull_request:

# Allow manually triggering the workflow.
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

Expand Down Expand Up @@ -64,46 +65,18 @@ jobs:
# - phpcs_version: The PHPCS versions to test against.
# IMPORTANT: test runs shouldn't fail because of PHPCS being incompatible with a PHP version.
# - PHPCS will run without errors on PHP 5.4 - 7.4 on any supported version.
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors.
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors, and we require a higher minimum version.
# - 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.
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
# - The `wpcs_version` key is added to allow additional test builds when multiple WPCS versions
# would be supported. As, at this time, only the latest stable release of WPCS is supported,
# no additional versions are included in the array.
# - experimental: Whether the build is "allowed to fail".
matrix:
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
phpcs_version: ['3.5.5', 'dev-master']
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
phpcs_version: ['3.7.1', 'dev-master']
wpcs_version: ['2.3.*']
experimental: [false]

include:
# Complete the matrix by adding PHP 8.0, but only test against compatible PHPCS versions.
- php: '8.0'
phpcs_version: 'dev-master'
wpcs_version: '2.3.*'
experimental: false
- php: '8.0'
# PHPCS 3.5.7 is the lowest version of PHPCS which supports PHP 8.0.
phpcs_version: '3.5.7'
wpcs_version: '2.3.*'
experimental: false

# Complete the matrix by adding PHP 8.1, but only test against compatible PHPCS versions.
- php: '8.1'
phpcs_version: 'dev-master'
wpcs_version: '2.3.*'
experimental: false
- php: '8.1'
# PHPCS 3.6.1 is the lowest version of PHPCS which supports PHP 8.1.
phpcs_version: '3.6.1'
wpcs_version: '2.3.*'
experimental: false

# Experimental builds. These are allowed to fail.
#- php: '8.2'
# phpcs_version: 'dev-master'
# wpcs_version: '2.3.*'
# experimental: true

GaryJones marked this conversation as resolved.
Show resolved Hide resolved
name: "Test: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }} - WPCS ${{ matrix.wpcs_version }}"

continue-on-error: ${{ matrix.experimental }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Go to https://docs.wpvip.com/technical-references/code-review/phpcs-report/ to l
## Minimal requirements

* PHP 5.4+
* [PHPCS 3.5.5+](https://github.com/squizlabs/PHP_CodeSniffer/releases)
* [PHPCS 3.7.1+](https://github.com/squizlabs/PHP_CodeSniffer/releases)
* [WPCS 2.3.0+](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases)
* [VariableAnalysis 2.11.1+](https://github.com/sirbrillig/phpcs-variable-analysis/releases)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"php": ">=5.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
"sirbrillig/phpcs-variable-analysis": "^2.11.1",
"squizlabs/php_codesniffer": "^3.5.5",
"squizlabs/php_codesniffer": "^3.7.1",
"wp-coding-standards/wpcs": "^2.3"
},
"require-dev": {
Expand Down