pestphp/pest
Pest is an elegant PHP testing framework focused on simplicity and a joyful developer experience. Write expressive tests with a clean syntax, run fast suites, and scale from tiny projects to large apps. Full docs at pestphp.com.
chore: bumps phpunit
fix: bumps phpunit, as previous versions became invalid due https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-qrr6-mg7r-m243
For better shard balance, Pest can distribute tests based on their actual execution time using the --update-shards option. This ensures each shard takes roughly the same wall-clock time, minimizing how long your slowest CI job runs.
Step 1: Generate the timing data by running your full test suite with --update-shards:
./vendor/bin/pest --update-shards
This runs all tests and records each test class's duration into tests/.pest/shards.json. You can also combine it with --parallel to speed things up:
./vendor/bin/pest --parallel --update-shards
Step 2: Commit tests/.pest/shards.json to your repository. This file is human-readable and looks like this:
{
"timings": {
"Tests\\Feature\\Payments\\StripeCheckoutTest": 1.608,
"Tests\\Feature\\Reports\\SalesReportTest": 2.105,
"Tests\\Unit\\Models\\UserTest": 0.050
},
"checksum": "...",
"updated_at": "2026-04-14T10:30:00+00:00"
}
Step 3: When you run --shard and tests/.pest/shards.json exists, Pest automatically uses time-balanced distribution:
./vendor/bin/pest --shard=1/5
The output will indicate that time-balanced sharding is active:
Shard: 1 of 5 — 12 files ran, out of 50 (time-balanced).
Announcement: x.com/enunomaduro/status/2042697927483609449
flaky and --flaky by @nunomadurotoBeCasedCorrectly arch test assertion by @SimonBroekaert and @nunomaduro in https://github.com/pestphp/pest/pull/1455Pest.php in stubs by @orphanedrecord in https://github.com/pestphp/pest/pull/1653toUseTrait to detect inherited and nested traits by @yondifon in https://github.com/pestphp/pest/pull/1515toExtend on laravel preset by @treyssatvincent in https://github.com/pestphp/pest/pull/1569laravel preset by @bibrokhim in https://github.com/pestphp/pest/pull/1580--parallel and --teamcity arguments by restoring --teamcity for ParaTest and fixing teamcity output concurrency by @smirok in https://github.com/pestphp/pest/pull/1615--filter matching by @Vmadmax in https://github.com/pestphp/pest/pull/1624paochore: bumps phpunit
fix: App\Http not being allowed to be used on laravel providers (arch testing)
fix: styling of stubs
fix: test dir option when used on parallel
Str::beforeLast not using multibyte string function of substrtoHaveSuspiciousCharacters from php preset as it may require an extension that is not availablepest()->only() to focus on one file only by @Willem-Jaap in https://github.com/pestphp/pest/pull/1598--dirty to --help command by @bilboque in https://github.com/pestphp/pest/pull/1595-intl extension is missing by @owenvoke in https://github.com/pestphp/pest/pull/1590phpunit@12.4.4phpunit@12.4.1phpunit@12.4Browser Plugin:
->from()->newYork() to set locale, timezone, and geolocation. Supports dozens of cities worldwide.assertNoBrokenImages to check for broken images on pages.withinFrame to test content inside iframes.withUserAgent to customize the user agent.resize, forward, back, waitForEvent, typeSlowly, rightClick, withKeyDown, and more.covers attributes12.3.6--coverage option causing out-of-memory exception--testdox causing an runtime exception.Pest v4 is here — now with browser testing! ✨
Browser tests that feel like unit tests: Laravel-ready, Playwright-powered, parallel-fast, with smoke & visual regression built in.
Discover Pest v4 — and our new website: pestphp.com
v11.5.33fix: installation of pest on laravel's starter kits
--compact flag now hides type coverage for files exceeding 100%.* as a wildcard in architecture-related expectations.JunitXmlLoggerout of sync with PHPUnit.--compact option to coverageHow can I help you explore Laravel packages today?