|
1 | 1 | # This workflow performs comprehensive WordPress plugin compatibility and quality checks. |
2 | 2 | # It runs multiple validation processes including: |
3 | 3 | # - 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) |
6 | 6 | # - WordPress compatibility testing across multiple WP versions (6.6, latest, nightly) |
7 | 7 | # - PHPStan static analysis for WordPress-specific code quality |
8 | 8 | # - WordPress security vulnerability scanning using pattern analysis |
@@ -135,17 +135,25 @@ jobs: |
135 | 135 | coverage: none |
136 | 136 | tools: composer:v2 |
137 | 137 |
|
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' |
140 | 140 | run: | |
141 | | - echo "🔧 Upgrading PHPUnit polyfills to v4.* for PHP 8.0+..." |
| 141 | + echo "🔧 Upgrading polyfills to v4.* for PHP 8.0-8.1..." |
142 | 142 | composer require-dev yoast/phpunit-polyfills:^4 --no-update |
143 | 143 |
|
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 |
145 | 152 | if: matrix.php-version == '8.3' |
146 | 153 | run: | |
147 | | - echo "🔧 Upgrading PHPUnit to v12.* for PHP 8.3..." |
| 154 | + echo "🔧 Upgrading to PHPUnit 12.* and polyfills 4.* for PHP 8.3..." |
148 | 155 | composer require-dev phpunit/phpunit:^12 --no-update |
| 156 | + composer require-dev yoast/phpunit-polyfills:^4 --no-update |
149 | 157 |
|
150 | 158 | - name: Install Composer dependencies |
151 | 159 | uses: ramsey/composer-install@v3 |
@@ -643,7 +651,7 @@ jobs: |
643 | 651 | runs-on: ubuntu-latest |
644 | 652 | strategy: |
645 | 653 | 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'] |
647 | 655 | wp-version: ['6.6', 'latest', 'nightly'] |
648 | 656 | fail-fast: false |
649 | 657 |
|
|
0 commit comments