From 6289847ae6330f20c0e51d4e1fbc4a6e6d266814 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 5 Dec 2023 14:01:02 +0000 Subject: [PATCH 1/4] Run tests against PHP 8.3 --- .github/workflows/coding-standards.yml | 2 +- .github/workflows/test.yml | 2 +- tests/nginx/php-8.3.conf | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/nginx/php-8.3.conf diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index e8f1528..6f5e83b 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: wp-versions: [ 'latest' ] #[ '6.1.1', 'latest' ] - php-versions: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] #[ '7.3', '7.4', '8.0', '8.1' ] + php-versions: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] #[ '7.3', '7.4', '8.0', '8.1' ] # Steps to install, configure and run tests steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be2a25c..1d4d3f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: fail-fast: false matrix: wp-versions: [ 'latest' ] #[ '6.1.1', 'latest' ] - php-versions: [ '7.4', '8.0', '8.1', '8.2' ] #[ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] #[ '7.4', '8.0', '8.1' ] # Folder names within the 'tests' folder to run tests in parallel. test-groups: [ diff --git a/tests/nginx/php-8.3.conf b/tests/nginx/php-8.3.conf new file mode 100644 index 0000000..e5b2c38 --- /dev/null +++ b/tests/nginx/php-8.3.conf @@ -0,0 +1,13 @@ +server { + listen 80; + root /home/runner/work/convertkit-gravity-forms/convertkit-gravity-forms/wordpress; + server_name 127.0.0.1; + index index.php; + location / { + try_files $uri $uri/ /index.php?$args; + } + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; + } +} \ No newline at end of file From d9c436d6b952a8a1ade3f793725a1b902ca46c23 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 5 Dec 2023 14:01:10 +0000 Subject: [PATCH 2/4] Remove unused nginx test config files for PHP 7.2 and 7.3 --- tests/nginx/php-7.2.conf | 13 ------------- tests/nginx/php-7.3.conf | 13 ------------- 2 files changed, 26 deletions(-) delete mode 100644 tests/nginx/php-7.2.conf delete mode 100644 tests/nginx/php-7.3.conf diff --git a/tests/nginx/php-7.2.conf b/tests/nginx/php-7.2.conf deleted file mode 100644 index 6e18e1e..0000000 --- a/tests/nginx/php-7.2.conf +++ /dev/null @@ -1,13 +0,0 @@ -server { - listen 80; - root /home/runner/work/convertkit-gravity-forms/convertkit-gravity-forms/wordpress; - server_name 127.0.0.1; - index index.php; - location / { - try_files $uri $uri/ /index.php?$args; - } - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; - } -} \ No newline at end of file diff --git a/tests/nginx/php-7.3.conf b/tests/nginx/php-7.3.conf deleted file mode 100644 index abcb474..0000000 --- a/tests/nginx/php-7.3.conf +++ /dev/null @@ -1,13 +0,0 @@ -server { - listen 80; - root /home/runner/work/convertkit-gravity-forms/convertkit-gravity-forms/wordpress; - server_name 127.0.0.1; - index index.php; - location / { - try_files $uri $uri/ /index.php?$args; - } - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; - } -} \ No newline at end of file From 779a43624562147980cf87301da5293798edb9c6 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 5 Dec 2023 14:03:05 +0000 Subject: [PATCH 3/4] Enable `WP_DEBUG` on all PHP versions --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d4d3f6..c8d6a61 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,9 +110,7 @@ jobs: run: wp-cli plugin install ${{ secrets.CONVERTKIT_PAID_PLUGIN_URLS }} # WP_DEBUG = true is required so all PHP errors are output and caught by tests (E_ALL). - # WP_DEBUG = false for PHP 8.2, otherwise E_DEPRECATED is output due to Gravity Forms. - name: Enable WP_DEBUG - if: ${{ matrix.php-versions != '8.2' }} working-directory: ${{ env.ROOT_DIR }} run: | wp-cli config set WP_DEBUG true --raw From 762b74939c20d4e99164faced6323822bea775c3 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 5 Dec 2023 14:26:37 +0000 Subject: [PATCH 4/4] Disable WP_DEBUG for PHP 8.2 and 8.3 due to Gravity Forms deprecated notices --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8d6a61..fbb8aec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,7 +110,9 @@ jobs: run: wp-cli plugin install ${{ secrets.CONVERTKIT_PAID_PLUGIN_URLS }} # WP_DEBUG = true is required so all PHP errors are output and caught by tests (E_ALL). + # WP_DEBUG = false for PHP 8.2 and 8.3, otherwise E_DEPRECATED is output due to Gravity Forms. - name: Enable WP_DEBUG + if: ${{ matrix.php-versions != '8.2' && matrix.php-versions != '8.3' }} working-directory: ${{ env.ROOT_DIR }} run: | wp-cli config set WP_DEBUG true --raw