Repository navigation
feat(CMS-3144): extend CI test matrix to PHP 8.3, 8.4, 8.5 and WP 7.0 / nightly - #385
Conversation
PHP 8.4 deprecates calling str_getcsv() without $escape. The IAB page
parses ~600 extra provider lines, so each page load wrote ~600
deprecation lines to debug.log on PHP 8.4 and 8.5. Behavior is unchanged
('\\' is the old default). Adds a regression test.
Pinned by commit SHA (lightweight tag 2.37.2). In v2.35.4, php-version 8.5 installs a nightly 8.5.0-dev build. The v2.37.2 README lists 8.5 as Stable and 5.6 as Stable (end of life), so all existing rows keep working. Runner behavior cannot be tested locally, the CI run on this branch is the proof.
9.6.7 is from 2023. Use the latest 9.6 release, so every PHP 8 row runs the same PHPUnit. Stays on 9.6, the same major as before. Verified locally in Docker: PHP 8.0.30, 8.1.34 and 8.2.34 / WP 7.1.3 / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test pass, 0 plugin lines in debug.log.
Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 8.3.35 / WP 7.1.3 / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log.
Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 8.4.26 / WP 7.1.3 / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log. Needs the str_getcsv fix (previous commit). Without it the smoke test logged 600 str_getcsv() $escape deprecations per IAB page load.
Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 8.5.11 / WP 7.1.3 / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log. Needs setup-php v2.37.2 (8.5 stable) and the str_getcsv fix, both earlier in this branch. Without the fix the smoke test logged the same 600 str_getcsv() deprecations as on PHP 8.4.
Covers the previous WP major. WP '7.0' resolves to the latest 7.0.x core and the branches/7.0 test suite. Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 8.2.34 / WP 7.0.7 / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log.
Early warning for the next WP release. continue-on-error keeps a red nightly job from failing the workflow. bin/install-wp-tests.sh already supports 'nightly' (core and test suite from trunk). Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 8.4.26 / WP 7.2-alpha-64231 (trunk) / PHPUnit 9.6.38: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log.
WP 7.0 dropped PHP 7.2 and 7.3, so 35f2eab pinned these rows to WP 6.5.5 with PHPUnit 6.5.14. WP 6.9 is the last WP that supports them. On WP 6.9 the CLI tests run (they are skipped on 6.5.5) and fail on PHPUnit 6.5.14: Error: Call to undefined method ...Test_Cookiebot_CLI_Command::assertStringNotContainsString() PHPUnit 7.5.20 has it. Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 7.3.33 / WP 6.9.10 / PHPUnit 7.5.20: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log.
WP 7.0 dropped PHP 7.2 and 7.3, so 35f2eab pinned these rows to WP 6.5.5 with PHPUnit 6.5.14. WP 6.9 is the last WP that supports them. On WP 6.9 the CLI tests run (they are skipped on 6.5.5) and fail on PHPUnit 6.5.14: Error: Call to undefined method ...Test_Cookiebot_CLI_Command::assertStringNotContainsString() PHPUnit 7.5.20 has it. Verified locally in Docker (same install script, PHPUnit phar and polyfills step as CI): PHP 7.2.34 / WP 6.9.10 / PHPUnit 7.5.20: OK (111 tests, 224 assertions) on single site and WP_MULTISITE=1. Smoke test (real WP site, WP_DEBUG_LOG on, plugin activate, wp cookiebot commands, front page, admin pages): pass, 0 plugin lines in debug.log.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PR Summary by QodoExtend CI coverage to PHP 8.5 and WordPress nightly
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
|
CodeAnt PR Risk: Low Risk
Assessed commit: |



User description
Summary
The CI matrix stopped at PHP 8.2 and WordPress
latest. It never ran on PHP 8.3, 8.4 or 8.5, and it had no early warning for the next WordPress release.JIRA: CMS-3144
What changed
CI matrix (
.github/workflows/test.yml)experimentalwithcontinue-on-error, so it warns early but does not block merges9.6.7->9.6.38on the PHP 8.0, 8.1 and 8.2 rows (and used for the new 8.x rows).6.5.5->6.9(the last WP that supports PHP 7.2/7.3), PHPUnit6.5.14->7.5.20. The CLI tests useassertStringNotContainsString, which needs PHPUnit 7.5+.shivammathur/setup-phpv2.35.4->v2.37.2(still pinned by SHA), needed for PHP 8.5.Code (
src/settings/pages/Iab_Page.php)get_extra_providers()now passes$escapeexplicitly tostr_getcsv(). Relying on the default is deprecated since PHP 8.4. The extra providers CSV has ~600 lines, so without this the IAB page floodsdebug.logwith deprecation notices on PHP 8.4+.',','"','\\'are the old defaults).Test (
tests/unit/Test_Iab_Page.php)get_extra_providers(), fails if anyE_DEPRECATEDis raised, and checks the first provider has a positive intidand aname.Test plan
pull_requestand pushes tomaster)Test_Iab_Pagepasses on PHP 8.4 and 8.5CodeAnt-AI Description
Expand PHP and WordPress CI coverage and stop PHP 8.4 deprecation logs
What Changed
Impact
✅ Cleaner debug logs on PHP 8.4+✅ Compatibility checks for PHP 8.3–8.5✅ Early warning for upcoming WordPress releases💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.