diff --git a/.github/workflows/basics.yml b/.github/workflows/basics.yml index 344c629c..9ac235ce 100644 --- a/.github/workflows/basics.yml +++ b/.github/workflows/basics.yml @@ -33,7 +33,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' # Can be updated to "latest" once PHPCS 3.8.0 has been released. coverage: none tools: cs2pr @@ -48,14 +48,12 @@ jobs: # Use the WIP/develop branches of all CS dependencies as an early detection system for bugs upstream. - name: 'Composer: adjust dependencies - use dev versions of CS dependencies' - # Note: while WPCS 3.0.0 is not yet supported, WPCS will not be updated. - # Once YoastCS has been updated for WPCS 3.0.0, WPCS dev-develop should be added (back) to this command. - # wp-coding-standards/wpcs:"dev-develop" run: > composer require --no-update --no-scripts --no-interaction squizlabs/php_codesniffer:"dev-master" phpcsstandards/phpcsutils:"dev-develop" phpcsstandards/phpcsextra:"dev-develop" + wp-coding-standards/wpcs:"dev-develop" # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index 91216b62..4e84aaee 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -58,12 +58,11 @@ jobs: - name: "Composer: set PHPCS dependencies for tests (dev)" if: ${{ matrix.cs_dependencies == 'dev' }} - # Note: while WPCS 3.0.0 is not yet supported, WPCS will not be updated for the `dev` builds. - # Once YoastCS has been updated for WPCS 3.0.0, WPCS dev-develop should be added to this command. run: > composer require --no-update --no-scripts --no-interaction --ignore-platform-req=php+ squizlabs/php_codesniffer:"dev-master" phpcsstandards/phpcsutils:"dev-develop" + wp-coding-standards/wpcs:"dev-develop" # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 434d353a..3ab3116a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,13 +18,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -# Note: while WPCS 3.0.0 is not (yet) supported by YoastCS, the "highest" release for WPCS should use -# the last stable WPCS release supported by YoastCS, i.e. `2.3.0`. -# Once support for WPCS 3.0.0 has been added, the matrix should switch (back) using `dev-develop`. env: PHPCS_HIGHEST: 'dev-master' UTILS_HIGHEST: 'dev-develop' - WPCS_HIGHEST: '2.3.0' + WPCS_HIGHEST: 'dev-develop' jobs: #### TEST STAGE #### @@ -92,12 +89,11 @@ jobs: - name: "Composer: set PHPCS dependencies for tests (dev)" if: ${{ matrix.cs_dependencies == 'dev' }} - # Note: while WPCS 3.0.0 is not yet supported, WPCS will not be updated for the `dev` builds. - # Once YoastCS has been updated for WPCS 3.0.0, WPCS dev-develop should be added to this command. run: > composer require --no-update --no-scripts --no-interaction --ignore-platform-req=php+ squizlabs/php_codesniffer:"${{ env.PHPCS_HIGHEST }}" phpcsstandards/phpcsutils:"${{ env.UTILS_HIGHEST }}" + wp-coding-standards/wpcs:"${{ env.WPCS_HIGHEST }}" # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies @@ -189,12 +185,11 @@ jobs: - name: "Composer: set PHPCS dependencies for tests (dev)" if: ${{ matrix.cs_dependencies == 'dev' }} - # Note: while WPCS 3.0.0 is not yet supported, WPCS will not be updated for the `dev` builds. - # Once YoastCS has been updated for WPCS 3.0.0, WPCS dev-develop should be added to this command. run: > composer require --no-update --no-scripts --no-interaction squizlabs/php_codesniffer:"${{ env.PHPCS_HIGHEST }}" phpcsstandards/phpcsutils:"${{ env.UTILS_HIGHEST }}" + wp-coding-standards/wpcs:"${{ env.WPCS_HIGHEST }}" # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index d6d78813..a21da6ec 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -57,6 +57,9 @@ + + + - + @@ -76,13 +76,13 @@ - + - + - - - - - - - - - - - - @@ -192,31 +180,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -231,4 +194,16 @@ */index\.php + + + + + + 5 + + diff --git a/composer.json b/composer.json index 13539cdf..55fbc671 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "phpcsstandards/phpcsextra": "^1.1.2", "phpcsstandards/phpcsutils": "^1.0.8", "squizlabs/php_codesniffer": "^3.7.2", - "wp-coding-standards/wpcs": "^2.3.0" + "wp-coding-standards/wpcs": "^3.0.1" }, "require-dev": { "phpcompatibility/php-compatibility": "^9.3.5",