diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index 3de35f83..38336154 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -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.*' name: "QTest${{ matrix.phpcs_version == 'dev-master' && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e4cb6cf..4ac024be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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'] wpcs_version: ['2.3.*'] experimental: [false] diff --git a/README.md b/README.md index a52db246..f2049fbd 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/composer.json b/composer.json index bab249fe..c7a2810c 100644 --- a/composer.json +++ b/composer.json @@ -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", - "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": { + "check-all": "Run all checks (lint, phpcs, feature completeness) and tests.", + "check-complete": "Check if all the sniffs have unit tests.", + "check-complete-strict": "Check if all the sniffs have unit tests and XML documentation.", + "check-cs": "Check the code style and code quality of the codebase via PHPCS.", + "lint": "Lint PHP files against parse errors.", + "run-tests": "Run all the unit tests for the VIP Coding Standards sniffs." } }