Skip to content

Support PHPUnit 13 #1630

@dbebawy

Description

@dbebawy

Summary

PHPUnit 13 was released on February 6, 2026. Pest 4.x currently pins to phpunit/phpunit ^12.5.8 with a conflict on >12.5.8, preventing PHPUnit 13 installation.

Analysis

I audited Pest's source for usage of all PHPUnit 13 removed APIs:

  • Assert::isType(), assertContainsOnly(), containsOnly()not used by Pest
  • testClassName() on hook events — Pest only uses this on BeforeFirstTestMethodErrored/AfterLastTestMethodErrored, which retain the method in PHPUnit 13
  • Configuration::includeTestSuite()/excludeTestSuite()not used
  • #[RunClassInSeparateProcess], --dont-report-useless-testsnot used

All internal APIs Pest depends on (TextUI\Application, Configuration\Registry, TestResult\Facade, CliArguments\Builder, etc.) retain their namespaces and method signatures in PHPUnit 13.

Pest's runtime code appears to be fully compatible with PHPUnit 13.

Blocker

nunomaduro/collision ^8.8.3 (a Pest runtime dependency) conflicts with phpunit/phpunit >=13.0.0. Collision PR #342 tracks PHPUnit 13 support there, but it's blocked because collision's CI uses Pest (which doesn't support PHPUnit 13 yet) — a circular dependency.

PR

I've submitted PR #1629 to widen the constraint. This breaks the circular dependency from the Pest side, allowing collision to update independently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions