Skip to content

Tests: Add PHP 8.5 testing#3698

Merged
acicovic merged 5 commits intodevelopfrom
update/add-php-8-5-testing-to-integration-tests
Oct 2, 2025
Merged

Tests: Add PHP 8.5 testing#3698
acicovic merged 5 commits intodevelopfrom
update/add-php-8-5-testing-to-integration-tests

Conversation

@acicovic
Copy link
Collaborator

@acicovic acicovic commented Sep 22, 2025

Description

With this PR, we're adding experimental PHP 8.5 testing to our integration and unit tests.

Motivation and context

Closes #3697.

How has this been tested?

Testing against PHP 8.5 should pass.

Summary by CodeRabbit

  • Tests

    • Expanded PHP version coverage to include 8.3 in standard test matrices.
    • Shifted coverage-enabled runs to target PHP 8.4 in include matrices.
    • Added experimental PHP 8.5 runs paired with the latest WordPress (trunk).
    • Simplified coverage declarations for the new experimental entry.
  • Chores

    • Updated CI workflows for integration and unit tests to reflect expanded PHP support and experimental runs.

@acicovic acicovic self-assigned this Sep 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 22, 2025

📝 Walkthrough

Walkthrough

Adds PHP 8.3 to the GitHub Actions PHP matrices for integration and unit tests, moves per-entry php: '8.3' include entries to '8.4', and introduces PHP 8.5 runs marked experimental (with wp: trunk) while removing explicit coverage settings for the new 8.5 entries.

Changes

Cohort / File(s) Summary of Changes
Integration tests matrix updates
.github/workflows/integration-tests.yml
- Add PHP 8.3 to the top-level php matrix
- Replace per-entry php: '8.3' include with php: '8.4' (preserving extensions/ini and coverage where present)
- Add new include entry php: '8.5' with wp: 'trunk' and experimental: true; explicit coverage: none removed
Unit tests matrix updates
.github/workflows/unit-tests.yml
- Add PHP 8.3 to the top-level php matrix
- Move the pcov/coverage-enabled include from php: '8.3' to php: '8.4'
- Remove previous php: '8.4' no-coverage include and add php: '8.5' include marked experimental: true

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Maintenance

Suggested reviewers

  • vaurdan
  • alecgeatches

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning In addition to adding PHP 8.5, the PR modifies the top-level PHP matrix (adding PHP 8.3) and shifts per-entry versions (e.g., moving an include from 8.3 to 8.4), which goes beyond the narrow scope of issue #3697 that requested only PHP 8.5 experimental testing. Either split the unrelated matrix changes (PHP 8.3/8.4 adjustments) into a separate PR or update this PR description to justify those changes and confirm they do not alter test behavior, and provide CI evidence for all modified PHP matrix entries.
Description Check ❓ Inconclusive The PR includes the required headings (Description, Motivation and context, How has this been tested) and links the issue, but the "How has this been tested?" section is vague and lacks concrete test steps, CI job links, or evidence that tests actually passed, so it is unclear whether testing was performed or what the results were. Please expand "How has this been tested?" with specific test steps, environment details, and links or logs to CI runs showing results for PHP 8.5 (and any other affected versions), or clearly state that tests have not yet been run.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Tests: Add PHP 8.5 testing" is concise, a single sentence, and accurately summarizes the primary change in the PR (adding PHP 8.5 test runs to the workflows), making it clear to a teammate scanning history.
Linked Issues Check ✅ Passed The changes add PHP 8.5 experimental runs to both the integration and unit test workflow files, which directly implements the objective of linked issue #3697 to begin testing against PHP 8.5 in experimental mode.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update/add-php-8-5-testing-to-integration-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@acicovic acicovic changed the title Integration tests: Add PHP 8.5 testing Tests: Add PHP 8.5 testing Sep 22, 2025
@acicovic acicovic marked this pull request as ready for review September 22, 2025 06:52
@acicovic acicovic requested a review from a team as a code owner September 22, 2025 06:52
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d897c8e and decda7d.

📒 Files selected for processing (2)
  • .github/workflows/integration-tests.yml (1 hunks)
  • .github/workflows/unit-tests.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: E2E against WordPress latest
🔇 Additional comments (5)
.github/workflows/unit-tests.yml (3)

33-33: Matrix expansion to PHP 8.3 looks good

Broadens coverage without changing behavior elsewhere.


41-43: Add PHP 8.5 as experimental — setup-php supports 8.5 (nightly); verify Composer/PHPUnit
shivammathur/setup-php@v2 supports PHP 8.5 as a nightly/8.5.0-dev build, so keeping experimental: true is fine; confirm your Composer/PHPUnit constraints and install flags (e.g., --ignore-platform-reqs where intended) won’t hard-fail on 8.5.

File: .github/workflows/unit-tests.yml Lines: 41-43

          - php: '8.5'
            experimental: true
      fail-fast: false

37-40: pcov supports PHP 8.4 — OK to shift coverage run

pcov v1.0.12 lists PHP 8.4 compatibility and shivammathur/setup-php@v2 provides PCOV binaries for PHP 8.4; switch to php: '8.4' and run the CI workflow once to confirm the pcov.exclude ini value behaves as expected.

.github/workflows/integration-tests.yml (2)

32-32: Matrix expansion to PHP 8.3 looks good

Keeps parity with unit-test coverage.


37-40: Coverage move to PHP 8.4 — pcov is compatible and will be installed by setup-php

pcov supports PHP 8.4 and shivammathur/setup-php can install it on Ubuntu runners (it builds via PECL/packages rather than shipping prebuilt pcov binaries), so the workflow's extensions: pcov for php: '8.4' should work.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/unit-tests.yml (1)

37-41: Tighten YAML quoting for ini-values (minor).

Current mixed quoting is valid but a bit brittle. Prefer single‑quoting the whole string to avoid escaping gymnastics.

Apply this diff:

-            ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
+            ini-values: 'pcov.directory=., pcov.exclude="~(vendor|tests)~"'
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between decda7d and 0f2a97f.

📒 Files selected for processing (2)
  • .github/workflows/integration-tests.yml (1 hunks)
  • .github/workflows/unit-tests.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/integration-tests.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: E2E against WordPress latest
🔇 Additional comments (2)
.github/workflows/unit-tests.yml (2)

33-33: PHP matrix expansion — looks good.

Adding up to 8.3 at the top level and using include for 8.4/8.5 is a clean way to customize coverage/flags without duplicating entries.


42-44: Confirmed: setup-php supports PHP 8.5 on ubuntu-24.04; pcov available for PHP 8.4 — omitting coverage for 8.5 is reasonable.

shivammathur/setup-php@v2 exposes PHP 8.5 (nightly 8.5.0-dev) on GitHub-hosted ubuntu-24.04 runners, and pcov is supported for PHP 8.4 (PCOV runs on PHP ≥ 7.1); marking 8.5 experimental with continue-on-error and leaving coverage out for 8.5 is appropriate.

@acicovic acicovic added this to the 3.20.8 milestone Oct 2, 2025
@acicovic acicovic merged commit 0001f7b into develop Oct 2, 2025
37 checks passed
@acicovic acicovic deleted the update/add-php-8-5-testing-to-integration-tests branch October 2, 2025 14:18
github-actions bot added a commit that referenced this pull request Oct 2, 2025
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.

Integration and unit tests: Test with PHP 8.5

1 participant