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

WPCS 3.0: Composer updates #732

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 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
6 changes: 1 addition & 5 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ 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'
wpcs_version: '2.3.*'
GaryJones marked this conversation as resolved.
Show resolved Hide resolved

name: "QTest${{ matrix.phpcs_version == 'dev-master' && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
# - 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']
phpcs_version: ['3.7.1', 'dev-master']
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
wpcs_version: ['2.3.*']
experimental: [false]

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
60 changes: 36 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,75 @@
{
"name": "automattic/vipwpcs",
"type": "phpcodesniffer-standard",
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions",
"license": "MIT",
"type": "phpcodesniffer-standard",
"keywords": [
"phpcs",
"static analysis",
"standards",
"WordPress"
],
"license": "MIT",
"authors": [
{
"name": "Contributors",
"homepage": "https://github.com/Automattic/VIP-Coding-Standards/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/Automattic/VIP-Coding-Standards/issues",
"wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki",
"source": "https://github.com/Automattic/VIP-Coding-Standards"
},
"require": {
"php": ">=5.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7",
"sirbrillig/phpcs-variable-analysis": "^2.11.1",
"squizlabs/php_codesniffer": "^3.5.5",
"wp-coding-standards/wpcs": "^2.3"
"squizlabs/php_codesniffer": "^3.7.1",
"wp-coding-standards/wpcs": "dev-develop"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9",
"phpcsstandards/phpcsdevtools": "^1.0",
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
"ruleset": "bin/ruleset-tests",
"lint": [
"bin/php-lint",
"bin/xml-lint"
"check-all": [
"@lint",
"@check-cs",
"@run-tests",
"@check-complete-strict",
"@ruleset"
],
"phpcs": "bin/phpcs",
"phpunit": "bin/unit-tests",
"coverage": "bin/unit-tests-coverage",
"check-complete": [
"@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./WordPressVIPMinimum"
],
"test": [
"@lint",
"@ruleset",
"@phpunit",
"@phpcs",
"@check-complete"
]
"check-complete-strict": [
"@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./WordPressVIPMinimum"
],
"check-cs": "bin/phpcs",
"lint": [
"bin/php-lint",
"bin/xml-lint"
],
"ruleset": "bin/ruleset-tests",
"run-tests": "bin/unit-tests",
"run-tests-coverage": "bin/unit-tests-coverage"
},
"support": {
"issues": "https://github.com/Automattic/VIP-Coding-Standards/issues",
"wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki",
"source": "https://github.com/Automattic/VIP-Coding-Standards"
"scripts-descriptions": {
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
"check-all": "Run all checks (lint, phpcs, feature completeness) and tests.",
"check-complete": "Check if all the sniffs have tests.",
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
"check-complete-strict": "Check if all the sniffs have unit tests and XML documentation.",
"check-cs": "Run the PHPCS script against the entire codebase.",
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
"lint": "Lint PHP files against parse errors.",
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
"run-tests": "Run all the unit tests for the VIP Coding Standards sniffs."
GaryJones marked this conversation as resolved.
Show resolved Hide resolved
}
}