Update minimum requirements and modernize CI workflow#121
Conversation
- Raise minimum PHP version from 7.4 to 8.0 - Raise minimum WordPress version from 6.1 to 6.7 - Update CI test matrix: PHP 8.0/8.4, WP trunk/6.9/6.7 - Add subversion installation step in CI to fix svn not found error - Update phpcs testVersion and minimum_supported_wp_version - Update README.md Tested up to 6.9 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Cache WordPress test library to skip downloads on cache hit - Conditionally install subversion only when cache misses - Add restore-keys for composer cache fallback - Remove Build step from test job (only needed for release) - Update MySQL 5.7 to 8.0 - Update shivammathur/setup-php to @v2 - Update actions/cache to @v4 - Update 10up/action-wordpress-plugin-deploy to @2.3.0 - Remove unnecessary tools, ini-values, and coverage settings - Add fail-fast: false for flaky test resilience - Update lint PHP version to 8.4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add multisite dimension to test matrix so single-site and multisite tests run as separate parallel jobs instead of sequentially. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the project’s declared platform requirements (PHP/WordPress) and modernizes the CI workflow to test a broader matrix with improved caching and parallelization.
Changes:
- Raised minimum requirements to PHP 8.0 and WordPress 6.7 across plugin metadata and tooling.
- Updated PHPCS compatibility settings to align with the new minimum supported PHP/WP versions.
- Refactored GitHub Actions workflow: matrix expansion (PHP/WP/single vs multisite), updated actions, caching improvements, and MySQL 8.0.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates “Requires at least”, “Tested up to”, and “Requires PHP” metadata. |
| custom-post-type-permalinks.php | Updates plugin header minimum WP/PHP requirements. |
| composer.json | Raises Composer PHP platform requirement to >= 8.0. |
| CLAUDE.md | Updates documentation to reflect new PHP minimum and revised CI matrix. |
| .phpcs.xml.dist | Updates PHPCompatibility testVersion and minimum supported WP version. |
| .github/workflows/test-and-release.yml | Modernizes CI matrix/caching, updates actions, and switches MySQL image version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@master | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| tools: phpunit-polyfills, phpunit | ||
| php-version: ${{ matrix.php }} | ||
| extensions: mbstring, intl , mysqli | ||
| ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | ||
| coverage: xdebug #optional, setup coverage driver | ||
|
|
||
| - name: Check PHP Version | ||
| run: php -v | ||
| extensions: mbstring, intl, mysqli | ||
| coverage: none |
There was a problem hiding this comment.
The workflow no longer installs PHPUnit via setup-php (tools removed), but composer test runs ./vendor/phpunit/phpunit/phpunit (composer.json script) and phpunit/phpunit is not listed in composer dev dependencies. As a result, the test job will fail because PHPUnit won’t exist in vendor/. Either add phpunit/phpunit as a dev dependency (and run it via vendor/bin/phpunit), or re-add the setup-php tool installation and update the composer test script accordingly.
| - name: Install WP Tests | ||
| run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp }} true | ||
|
|
||
| - name: Build | ||
| run: | | ||
| bash ./bin/build.sh | ||
|
|
||
| - name: phpunit tests | ||
| run: | | ||
| composer test | ||
| WP_MULTISITE=1 composer test | ||
| run: composer test | ||
| env: | ||
| WP_MULTISITE: ${{ matrix.multisite && '1' || '' }} |
There was a problem hiding this comment.
The multisite matrix appears ineffective: bin/install-wp-tests.sh doesn’t read WP_MULTISITE and the workflow doesn’t generate a multisite wp-tests-config.php, so these jobs likely run the same single-site test suite twice. If multisite coverage is intended, set the appropriate multisite constant/config when installing the WP test suite (or adjust the install script to support multisite setup) and ensure the multisite flag is applied before/at install time, not only during composer test.
- Add Backward Compatibility Policy section to CLAUDE.md - Skip CI on pull_request and push when only .md files are changed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add weekly cache key rotation for trunk WP test library to prevent stale caches - Improve svn conditional install to check both command availability and cache validity - Normalize README.md markdown formatting (list markers, trailing spaces) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
CI workflow improvements
Test plan
composer phpcspasses