pestphp / pestphp/pest

Support PHPUnit 13

Open
#1,630 0 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the PHPUnit constraint described in the issue and PR #1629, then verify the documented PHPUnit 13 compatibility analysis. Done means Pest can install with PHPUnit 13 without the current constraint or Collision conflict; check the linked Collision PR and relevant dependency resolution before making any change.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.