symfony/phpunit-bridge
PHPUnit Bridge adds utilities on top of PHPUnit, with a focus on managing deprecation notices in your test suite. It helps you track, report, and fix deprecations so your code stays compatible with future Symfony and PHP versions.
ClockMock/DnsMock and the time-sensitive test detection address a recurring, hard-to-attribute source of CI noise (tests that pass for months then fail on a date boundary or in a network-restricted runner). Quantifying that noise is usually the fastest way to justify the work.console, http-foundation, finder, error-handler, mime), so Symfony deprecations do surface in Laravel codebases. This package is what makes those visible and attributable to your code versus vendor code.Adopt when:
Look elsewhere or defer when:
--display-deprecations, --fail-on-deprecation, and baseline support cover most of this. Adding a bridge for a 200-test suite is overhead without payoff.require-dev, weigh that explicitly.Caveat worth flagging internally: the dependency/reach metrics for this package are not a reliable demand signal — it's historically a Symfony monorepo subpackage, so star counts and dependent counts understate actual usage and shouldn't be treated as adoption evidence either way. Judge it on the release cadence, backport discipline, and whether the problem it solves is on your roadmap.
For executives — one paragraph: This is a free, MIT-licensed, actively maintained testing utility from Symfony that makes framework and PHP upgrades predictable instead of heroic. It converts "we think there's a lot of deprecated code" into a counted, grouped, prioritized list, and it lets us put a hard ceiling on new deprecation debt in CI. The business value is schedule risk reduction on upgrades we have to do anyway, plus reclaimed engineering time currently spent triaging noisy test output and date-dependent flaky tests. Cost is near zero: dev-only, no production footprint, no licensing spend.
For engineering — the ask: Add symfony/phpunit-bridge as a require-dev dependency and adopt two things first — the deprecation report in CI and the threshold gate. Do not attempt a full configuration rollout in one pass; start with reporting only, measure volume for two sprints, then set thresholds slightly above current state and ratchet down. Expect the main friction to be triaging the initial backlog, not the install. If we're also planning a PHPUnit major-version bump, sequence the bridge adoption first — its compatibility layer is what lets the PHPUnit upgrade and the framework upgrade be separate, individually shippable pieces of work rather than a single high-risk change. Success criteria: a known deprecation count that trends down sprint over sprint, zero deprecation-related surprise failures during the next upgrade, and no date- or DNS-dependent test failures in CI.
Known risks to state up front: dev-only dependency, community-supported (no SLA), and value is concentrated in Symfony-component deprecations — so if our next two quarters have no upgrade work on the roadmap, this is a "revisit later," not a "do now."
How can I help you explore Laravel packages today?