Skip to content

Commit 11b91c5

Browse files
authored
Fixes
1 parent 894fc92 commit 11b91c5

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/wp-compatibility-test.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This workflow performs comprehensive WordPress plugin compatibility and quality checks.
22
# It runs multiple validation processes including:
33
# - WordPress Plugin Check for WordPress.org compatibility
4-
# - PHPUnit tests across multiple PHP versions (7.4, 8.0-8.2 with PHPUnit 11; 8.3 with PHPUnit 12)
5-
# - PHP compatibility testing across multiple PHP versions (7.4, 8.0, 8.3, 8.4)
4+
# - PHPUnit tests across multiple PHP versions (7.4 with PHPUnit 9; 8.0-8.1 with polyfills 4; 8.2 with PHPUnit 10; 8.3 with PHPUnit 12)
5+
# - PHP compatibility testing across multiple PHP versions (7.4, 8.0, 8.3, 8.4, 8.5)
66
# - WordPress compatibility testing across multiple WP versions (6.6, latest, nightly)
77
# - PHPStan static analysis for WordPress-specific code quality
88
# - WordPress security vulnerability scanning using pattern analysis
@@ -135,17 +135,25 @@ jobs:
135135
coverage: none
136136
tools: composer:v2
137137

138-
- name: Upgrade polyfills for PHP 8.0+
139-
if: matrix.php-version >= '8.0'
138+
- name: Upgrade PHPUnit & polyfills for PHP 8.0–8.1
139+
if: matrix.php-version == '8.0' || matrix.php-version == '8.1'
140140
run: |
141-
echo "🔧 Upgrading PHPUnit polyfills to v4.* for PHP 8.0+..."
141+
echo "🔧 Upgrading polyfills to v4.* for PHP 8.0-8.1..."
142142
composer require-dev yoast/phpunit-polyfills:^4 --no-update
143143
144-
- name: Upgrade PHPUnit for PHP 8.3
144+
- name: Upgrade PHPUnit & polyfills for PHP 8.2
145+
if: matrix.php-version == '8.2'
146+
run: |
147+
echo "🔧 Upgrading to PHPUnit 10.* and polyfills 4.* for PHP 8.2..."
148+
composer require-dev phpunit/phpunit:^10 --no-update
149+
composer require-dev yoast/phpunit-polyfills:^4 --no-update
150+
151+
- name: Upgrade PHPUnit & polyfills for PHP 8.3
145152
if: matrix.php-version == '8.3'
146153
run: |
147-
echo "🔧 Upgrading PHPUnit to v12.* for PHP 8.3..."
154+
echo "🔧 Upgrading to PHPUnit 12.* and polyfills 4.* for PHP 8.3..."
148155
composer require-dev phpunit/phpunit:^12 --no-update
156+
composer require-dev yoast/phpunit-polyfills:^4 --no-update
149157
150158
- name: Install Composer dependencies
151159
uses: ramsey/composer-install@v3
@@ -643,7 +651,7 @@ jobs:
643651
runs-on: ubuntu-latest
644652
strategy:
645653
matrix:
646-
php-version: ['7.4', '8.0', '8.3', '8.4']
654+
php-version: ['7.4', '8.0', '8.3', '8.4', '8.5']
647655
wp-version: ['6.6', 'latest', 'nightly']
648656
fail-fast: false
649657

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": ">=7.4"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "11.*",
17+
"phpunit/phpunit": "9.*",
1818
"yoast/phpunit-polyfills": "2.*",
1919
"squizlabs/php_codesniffer": "3.*",
2020
"wp-coding-standards/wpcs": "3.*",

0 commit comments

Comments
 (0)