Update PHPUnit dependencies for PHP 8.5 support in Drupal 10.6

Created on 27 August 2025, 14 days ago

Problem/Motivation

Follow-up for #3541427-25: Bump PHPUnit to ^11.5.34 with all dependencies for testing with PHP 8.5

PHPUnit was updated to ^11.5.34 with all dependencies for PHP 8.5 support in Drupal 11.x. However, as noted in comment #25, we need to update these dependencies as far as possible on Drupal 10.6 in case PHP 8.5 support is added there.

The challenge is that we can't do a direct backport of all changes from 11.x due to potential compatibility constraints with 10.x, so we need to evaluate which dependency updates can be safely backported.

Steps to reproduce

1. Check current PHPUnit and testing dependencies in 10.6.x
2. Compare with the versions used in 11.x after 📌 Bump PHPUnit to ^11.5.32 with all dependencies for testing with PHP 8.5 Active
3. Identify PHP 8.5 compatibility issues in 10.6.x testing

Proposed resolution

1. Update dependencies as far as possible while maintaining 10.x compatibility
2. For dependencies that can't be updated, determine if:
- Deprecations need to be skipped
- Shims need to be implemented
- Alternative approaches are needed

Remaining tasks

- Analyze dependency compatibility for 10.6.x
- Handle any remaining compatibility issues
- Create MR, review and commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

10.6

Component

phpunit

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @andypost
  • 🇬🇧United Kingdom catch

    I discussed this a bit with @quietone in slack.

    Drupal 12 will require PHP 8.5 per 📌 [12.x] Require PHP 8.5 Postponed .

    Drupal 11.3 will support PHP 8.5 soon.

    This means that sites can update to PHP 8.4 on Drupal 10, then to Drupal 11.3, then to PHP 8.5, then to Drupal 12.

    It would be nice if we could support PHP 8.5 on Drupal 10, but I don't think we should go out of our way to do that.

    So e.g. if phpunit 9 and its dependencies adds PHP 8.5 support, that's great, but if they don't, then we should either skip deprecation messages or not do anything, but not get into shims etc.

    Going to postpone this on full PHP 8.5 support in Drupal 11 for now, so we know what the full scope there was.

  • 🇬🇧United Kingdom catch
Production build 0.71.5 2024