Skip to content

Upgrade PHPUnit to 10 #622

Closed
Closed

Description

@armanist

Summary

Move the test framework from PHPUnit 9 to PHPUnit 10 (phpunit/phpunit from ^9.0 to ^10.5).

Why

PHPUnit 9 is no longer the current line. The PHP 8.1 minimum (#595) is what makes PHPUnit 10 possible, since it requires PHP 8.1 or newer.

Scope

  • Raise phpunit/phpunit to ^10.5 in composer.json. Composer resolves it together with the newer sebastian/* packages and phpunit/php-code-coverage 10. mockery/mockery and mikey179/vfsstream are already at their latest versions.
  • Migrate phpunit.xml to the PHPUnit 10 schema: verbose and convertDeprecationsToExceptions are gone, and <coverage processUncoveredFiles> becomes <source>.
  • Check that the composer test flags and the CI coverage upload still work.
  • Fix whatever the suite reports under PHPUnit 10, such as risky tests, output during tests, and global-state handling in the @runInSeparateProcess and @preserveGlobalState tests. The @dataProvider annotations should keep working; this needs confirming.
  • The checkpoints are written after a first run on PHPUnit 10 shows the real failures.

Acceptance Criteria

  • composer.json requires phpunit/phpunit ^10.5
  • phpunit.xml uses the PHPUnit 10 schema without deprecation warnings
  • the suite passes on PHP 8.1, 8.2 and 8.3, and CI is green, with coverage still produced
  • no test is skipped or removed only to make the upgrade pass

Activity

  1. added this to the 3.1.1 milestone on Oct 27, 2026
  2. self-assigned this
    on Oct 28, 2026
  3. added 13 commits that reference this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions