From 82ac13c7a8e92da236f782857577982e2f525971 Mon Sep 17 00:00:00 2001 From: Roni Laukkarinen Date: Wed, 14 Feb 2024 17:03:52 +0200 Subject: [PATCH] Update unit tests for WordPress Coding Standards 3.0.1 --- .github/workflows/php.yml | 21 +++++++++++++-------- CHANGELOG.md | 5 +++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0b12019f..d0e97af2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -1,7 +1,7 @@ # @Author: Roni Laukkarinen # @Date: 2023-02-15 17:39:37 # @Last Modified by: Roni Laukkarinen -# @Last Modified time: 2023-05-18 17:26:05 +# @Last Modified time: 2024-02-14 17:02:41 name: PHP on: [push, pull_request] @@ -28,16 +28,21 @@ jobs: coverage: xdebug2 - name: Set up PHPCS and WordPress-Coding-Standards + uses: php-actions/composer@v6 + env: + COMPOSER: "composer.json" + with: + php_version: "7.4" + version: "2.3.7" + args: "--ignore-platform-reqs --optimize-autoloader" run: | - git clone -b master --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR - git clone -b 2.2.1 --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $WPCS_DIR - $PHPCS_DIR/bin/phpcs --config-set installed_paths $WPCS_DIR,$PHPCOMPAT_DIR,$SNIFFS_DIR - git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $PHPCOMPAT_DIR + composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true + composer global require --dev wp-coding-standards/wpcs:"^3.0" + composer global require --dev phpcompatibility/php-compatibility:"*" - - name: Run PHPCS + - name: Run PHP_CodeSniffer run: | - $PHPCS_DIR/bin/phpcs -p . --ignore=node_modules,*/css/*,*/sass/* --standard=phpcs.xml + vendor/bin/phpcs -p . --extensions=php --ignore=node_modules,*/css/*,*/sass/* --standard=phpcs.xml - name: Test PHP for syntax errors run: find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l - diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c5f110..80c28d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### 9.4.0rc: 2024-02-14 + +* Update unit tests for WordPress Coding Standards 3.0.1 +* Prepare for PHP version 8.3 + ### 9.3.6: 2024-01-10 * Fix the permission issue with self-updater