Skip to content

Update minimum requirements and modernize CI workflow#121

Merged
torounit merged 5 commits intomasterfrom
update/minimum-requirements
Mar 31, 2026
Merged

Update minimum requirements and modernize CI workflow#121
torounit merged 5 commits intomasterfrom
update/minimum-requirements

Conversation

@torounit
Copy link
Copy Markdown
Owner

@torounit torounit commented Mar 31, 2026

Summary

  • Raise minimum PHP version from 7.4 to 8.0
  • Raise minimum WordPress version from 6.1 to 6.7
  • Add WordPress 6.9 to CI test matrix and update Tested up to
  • Add Backward Compatibility Policy to CLAUDE.md
  • Skip CI when only markdown files are changed

CI workflow improvements

  • Split single-site and multisite tests into parallel matrix jobs
  • 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, 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
  • Skip CI on markdown-only changes

Test plan

  • CI passes on all matrix combinations (PHP 8.0/8.4 × WP trunk/6.9/6.7 × single/multisite)
  • composer phpcs passes
  • Verify plugin activates on WordPress 6.7 with PHP 8.0

torounit and others added 3 commits April 1, 2026 01:46
- 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>
@torounit torounit changed the title Update minimum requirements to PHP 8.0 and WordPress 6.7 Update minimum requirements and modernize CI workflow Mar 31, 2026
@torounit torounit requested a review from Copilot March 31, 2026 17:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md Outdated
Comment on lines 33 to +38
- 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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 64 to +70
- 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' || '' }}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/test-and-release.yml
Comment thread .github/workflows/test-and-release.yml Outdated
torounit and others added 2 commits April 1, 2026 02:24
- 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>
@torounit torounit merged commit f70b187 into master Mar 31, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants