Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Whoops Middleware Laravel Package

franzl/whoops-middleware

PSR-15 middleware that drops the Whoops error handler into any middleware pipeline, turning uncaught exceptions into rich, stack-trace-friendly debug pages during development while staying out of the way in production.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer experience as a roadmap item. Whoops gives developers readable stack traces and context in local/preview environments. If your team spends measurable time debugging opaque error pages across services, this package is a cheap, high-signal DX improvement—and 2.0.0 confirms someone is still doing dependency upkeep on it.
  • Build vs. buy. The core logic is a thin PSR-15 adapter around Whoops—maybe 100 lines. "Buying" (adopting) saves a day of plumbing and, as of 2.0.0, also saves you from hand-rolling PSR-7 discovery. "Building" remains defensible only if you need custom renderers or tight framework coupling. For most teams, adopt.
  • Standardizing error pages across a polyglot PHP stack. 2.0.0 makes this a materially better story: the adapter no longer forces Laminas on you and instead resolves whichever PSR-7 implementation is already present via middleware/utils. That lowers the integration cost of running one consistent local debugging experience across Slim, Mezzio, Laminas, and bridged Symfony services.
  • Onboarding and incident triage in non-production. New engineers and QA spend less time guessing; local failures become legible immediately, which shortens onboarding and reduces "works on my machine" escalation.
  • Explicitly not a production error-handling decision. Whoops exposes source, environment, and request context. This is a dev-tooling decision with a hard "never in prod" guardrail—treat that guardrail as a product requirement, not an implementation detail. 2.0.0 does not change this at all.

When to Consider This Package

Consider it when:

  • You have one or more PSR-15-compatible PHP services and want pretty, consistent error output during local development.
  • Your team finds default framework error pages insufficient—particularly when debugging third-party or middleware-layer exceptions where stack traces matter.
  • You want near-zero dependency surface (MIT, tiny footprint). This is now stronger than in 1.x: the 2.0.0 change to resolve PSR-7 through middleware/utils avoids pinning a specific implementation, which reduces version-conflict risk in monorepos and multi-service repos.
  • You are on PHP 8+ (2.0.0 adds PHP 8 support) and want a dependency that has actually been touched this cycle. Still pin to a known-good version, but the "frozen since 2021" objection is now weaker—though not gone.
  • Laravel teams: understand that Laravel uses its own middleware contract, not PSR-15, so this is most natural for PSR-15 frameworks. In Laravel you'd typically bridge it or use the framework's native tooling instead. The PSR-7 decoupling in 2.0.0 makes bridging slightly less painful, but it doesn't change the recommendation.

Look elsewhere when:

  • You are Laravel-first—current Laravel ships Ignition/its own debug pages; adding this is redundant plumbing.
  • You need production error handling, alerting, or user-facing error UX—Whoops is the wrong tool entirely.
  • You require active maintenance, security SLAs, or long-term support. 2.0.0 is a positive signal—PHP 8 support and a dependency cleanup indicate a maintainer is still responsive—but the release cadence remains sparse and there is no published support policy. Treat it as a maintained-enough dev utility, not a vendor relationship.
  • You need custom error rendering, filtering, or sanitization—you'll likely outgrow the adapter and should own the integration.
  • You are still on PHP 7.0/7.1: 2.0.0 drops support for PHP <7.2 and is a major version bump. Plan the PHP floor upgrade before adopting, and budget a compatibility pass if you already run 1.x.

How to Pitch It (Stakeholders)

For executives: This is a small, free (MIT) developer-tooling dependency that improves local debugging. The 2.0.0 release shows the project is still receiving maintenance—PHP 8 support and a dependency cleanup—so the "abandoned utility" risk is lower than it was. It carries no production risk if scoped correctly to development environments, and it costs essentially nothing to trial. Treat it as a convenience, not a commitment: no SLA, no vendor.

For engineering: It's a thin PSR-15 middleware that wires Whoops into your request pipeline. 2.0.0 is a breaking change: minimum PHP moves to 7.2 with PHP 8 support added, and the adapter now uses middleware/utils to detect an available PSR-7 implementation rather than forcing Laminas—so check which PSR-7 package your services actually ship and confirm the resulting version constraints resolve. Upside is fewer dependency conflicts and better consistency across PSR-15 services. Still plan to pin a version, gate it behind environment checks so it can never reach production, and document that requirement. If you're Laravel-centric, skip it; your framework already covers this ground. Otherwise the integration is low-effort with a small blast radius—ideal for a spike or a one-sprint trial, now with a cleaner upgrade path than 1.x offered.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums