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

Slim Whoops Laravel Package

zeuxisoo/slim-whoops

Integrates the Whoops error handler with Slim Framework, replacing default error pages with detailed debugging output, stack traces, and a clean interface during development. Install via Composer and register the middleware/provider to get started quickly.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. zeuxisoo/slim-whoops is a thin adapter that wires the filp/whoops error handler into Slim's middleware pipeline. It is not a runtime component of the application architecture — it is a developer-experience layer that renders rich HTML stack traces and code excerpts when an exception is thrown. As such, its architectural footprint is small and its fit is conditional: it belongs in require-dev, registered only when APP_ENV=development. It does not participate in request routing, DI, or business logic, so it imposes almost no structural constraint on the codebase.

Integration feasibility. Composer-only, single dependency (filp/whoops), a few lines to register middleware. The main branch of complexity is Slim version: Slim 3's native middleware signature versus Slim 4's PSR-15 stack. The package has historically been a Slim 3 wrapper; for Slim 4 you either need the PSR-15 variant or — realistically — a ~10-line custom middleware around Whoops directly, which makes the wrapper's value largely evaporate. Whichever path, integration is a half-day task, not a project.

Technical risk. Three concerns dominate:

  1. Maintenance risk. Single maintainer, 127 stars, 0 dependents, low opportunity score (29.94). Whoops itself has slowed in maintenance. A dev-only dependency that goes stale is low-severity but will eventually block PHP upgrades.
  2. Version drift. Slim 3 is end-of-life; Slim 4/5 and PHP 8.x compatibility are the live questions. Any team on modern Slim should validate before assuming drop-in compatibility.
  3. Exposure risk. Whoops exposes environment variables, source snippets, and stack traces. If the middleware is ever registered in a non-dev environment, it is a direct information-disclosure vulnerability. This is the single most important control.

Key questions.

  • Which Slim version(s) are in scope, and does the package's middleware match that signature?
  • Is the project on PHP 8.x, and does the pinned Whoops/package combination support it?
  • Who internally owns this dependency if upstream goes quiet?
  • What mechanism guarantees the middleware is registered only in development (env check, require-dev, config gate)?

Integration Approach

Stack fit. Appropriate only for PHP/Slim teams. Value is highest on Slim 3 where it is a genuine drop-in; value drops sharply on Slim 4+, where native addErrorMiddleware plus Whoops directly (or an alternative like Spatie Ignition/symfony/error-handler) covers the same ground with one less dependency.

Migration path. Treat this as an enhancement, not a migration:

  • Slim 3 → keep: add as require-dev, register conditionally, no production change.
  • Slim 4+ → bypass: add filp/whoops directly and write a small PSR-15 middleware; avoid inheriting a stale Slim-3-era wrapper.
  • Replacement path: if Whoops lags PHP releases, swap to a maintained alternative; the surface area to rewrite is one middleware class.

Compatibility. Pin the package and Whoops to versions verified against the target PHP and Slim version. Require composer.lock discipline so dev machines and CI agree. Confirm autoloading and that the middleware class name matches the installed major version (the Slim 3 and Slim 4 classes differ).

Sequencing.

  1. Confirm Slim/PHP versions and pick the matching package major.
  2. Add to require-dev only; never require.
  3. Register behind an explicit environment gate (APP_ENV === 'development'), not implicitly.
  4. Verify pretty errors appear in dev and that a simulated production run shows plain error handling.
  5. Add a CI or config lint check that fails if the middleware is registered outside dev.

Operational Impact

Maintenance. Low ongoing effort, but not zero: the package and Whoops must be bumped alongside PHP and Slim upgrades. Given the low activity signal, expect periods without upstream releases; budget a small owner to watch it. Total cost of ownership is measured in hours per year, not weeks.

Support. No meaningful upstream support ecosystem (0 dependents, single maintainer). Internal ownership is required — treat it as "vendored in spirit." Documentation should note the fallback (direct Whoops middleware) so any engineer can replace it without research.

Scaling. No runtime scaling implications. It is dev-only and does not execute in production request paths. The only "scale" concern is team-wide rollout: standardizing the env gate and documenting it across services.

Failure modes.

  • Information disclosure in production — highest severity; caused by misconfiguration, not the package itself. Mitigate with env gating, CI checks, and config review.
  • Masked errors — a broken Whoops middleware can swallow or reformat exceptions, making debugging harder in dev. Keep a kill switch (comment out registration) documented.
  • Upgrade breakage — PHP/Slim bumps surface incompatible pins; low blast radius (dev only) but can block upgrades until patched.
  • Abandonment — no upstream fix for a future PHP incompatibility; replacement is cheap, so impact is time-boxed.

Ramp-up. Near-zero. Any PHP developer can read and modify a single middleware registration. The only onboarding item is the "dev-only, gated" convention.

Recommendation. Adopt narrowly as a dev-only convenience for Slim 3 codebases, with strict environment gating and an explicit owner. For Slim 4+, skip the wrapper and integrate Whoops (or a maintained alternative) directly. Given the low score and dependency signals, do not let it become load-bearing infrastructure.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin