Skip to content

feat(CMS-3144): extend CI test matrix to PHP 8.3, 8.4, 8.5 and WP 7.0 / nightly - #385

Merged
fabianwgl merged 10 commits into
masterfrom
feat/CMS-3144-extend-ci-test-matrix
Oct 12, 2026
Merged

fabianwgl merged 10 commits into
masterfrom
feat/CMS-3144-extend-ci-test-matrix

Conversation

@fabianwgl

@fabianwgl fabianwgl commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

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)

  • New rows:
    • PHP 8.3 / WP latest
    • PHP 8.4 / WP latest
    • PHP 8.5 / WP latest
    • PHP 8.2 / WP 7.0 (pins the previous major)
    • PHP 8.4 / WP nightly, marked experimental with continue-on-error, so it warns early but does not block merges
  • PHPUnit 9.6.7 -> 9.6.38 on the PHP 8.0, 8.1 and 8.2 rows (and used for the new 8.x rows).
  • PHP 7.2 and 7.3 rows: WP 6.5.5 -> 6.9 (the last WP that supports PHP 7.2/7.3), PHPUnit 6.5.14 -> 7.5.20. The CLI tests use assertStringNotContainsString, which needs PHPUnit 7.5+.
  • shivammathur/setup-php v2.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 $escape explicitly to str_getcsv(). Relying on the default is deprecated since PHP 8.4. The extra providers CSV has ~600 lines, so without this the IAB page floods debug.log with deprecation notices on PHP 8.4+.
  • Same parsing result as before (',', '"', '\\' are the old defaults).

Test (tests/unit/Test_Iab_Page.php)

  • New test: calls get_extra_providers(), fails if any E_DEPRECATED is raised, and checks the first provider has a positive int id and a name.

Test plan

  • CI passes on all blocking rows (first CI run is this PR, the workflow only runs on pull_request and pushes to master)
  • PHP 8.4 / WP nightly row runs (allowed to fail)
  • Test_Iab_Page passes on PHP 8.4 and 8.5

CodeAnt-AI Description

Expand PHP and WordPress CI coverage and stop PHP 8.4 deprecation logs

What Changed

  • IAB provider data still parses as before, without filling debug logs with deprecation notices on PHP 8.4 and newer.
  • CI now checks PHP 8.3–8.5, WordPress 7.0, and WordPress nightly; nightly failures are non-blocking.
  • Checks for PHP 7.2 and 7.3 now use WordPress 6.9, which supports those PHP versions.

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

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

codeant-ai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 298c59e Oct 09, 2026 · 09:44 09:46

@codeant-ai

codeant-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@qodo-code-review

qodo-code-review Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

Sorry, something went wrong

We weren't able to complete the code review on our side. Please try again manually by commenting /agentic_review on this PR.

Grey Divider

Qodo Logo

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Oct 9, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Extend CI coverage to PHP 8.5 and WordPress nightly

⚙️ Configuration changes 🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Add PHP 8.3–8.5, WordPress 7.0, and nonblocking nightly CI coverage.
• Refresh CI tooling and legacy PHP rows to keep the expanded matrix runnable.
• Prevent PHP 8.4 CSV deprecations on the IAB page and add a regression test.
Diagram

graph TD
  A["PR or push"] --> B["Version matrix"] --> C["PHP and WP setup"] --> D["PHPUnit suites"] --> E["IAB CSV test"] --> F{"Experimental row?"}
  F -->|Yes| G["Nonblocking result"]
  F -->|No| H["Blocking result"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Full PHP–WordPress Cartesian matrix
  • ➕ Would expose more version interactions automatically.
  • ➖ Would create many redundant or unsupported combinations and increase CI cost.

Recommendation: Keep the curated matrix: it adds targeted coverage while preserving supported legacy combinations, and the nonblocking nightly row provides early warning without making prerelease failures a merge gate.

Files changed (3) +89 / -11

Bug fix (1) +7 / -1
Iab_Page.phpAvoid deprecated CSV parsing defaults +7/-1

Avoid deprecated CSV parsing defaults

• Passes the existing escape-character default explicitly when parsing extra providers, preventing PHP 8.4+ deprecation notices without changing the intended CSV format.

src/settings/pages/Iab_Page.php

Tests (1) +42 / -0
Test_Iab_Page.phpTest IAB provider parsing without deprecations +42/-0

Test IAB provider parsing without deprecations

• Adds a unit test that captures deprecations during provider parsing and checks that the returned providers have a positive integer ID and a name.

tests/unit/Test_Iab_Page.php

Other (1) +40 / -10
test.ymlExpand and refresh the CI compatibility matrix +40/-10

Expand and refresh the CI compatibility matrix

• Adds PHP 8.3–8.5, a WordPress 7.0 row, and a nonblocking WordPress nightly row. Refreshes the pinned PHP setup action and PHPUnit versions, and moves PHP 7.2/7.3 coverage to WordPress 6.9.

.github/workflows/test.yml

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@codeant-ai

codeant-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; the CSV parser now passes an explicit escape character to avoid PHP 8.4 deprecations.
  • A regression test checks provider parsing and deprecations, and the CI matrix adds newer PHP and WordPress combinations.

Assessed commit: 298c59ecb829

@fabianwgl
fabianwgl merged commit 9678ecc into master Oct 12, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants