soft-passio/api-exception-bundle
A PHP bundle for standardized API exception handling, converting errors into consistent JSON responses with configurable status codes and payloads. Helps keep API error output predictable and easy to debug across services.
Architecture fit. The package is a Symfony bundle, not a Laravel package, so it does not integrate with Laravel's exception-handling pipeline at all (Laravel routes exceptions through App\Exceptions\Handler / Illuminate\Foundation\Exceptions\Handler, not a Symfony kernel.exception listener). If the target stack is genuinely Laravel, this package is the wrong shape. If the target is Symfony, it is a thin kernel.exception listener that converts thrown exceptions into application/problem+json RFC 7807 responses — a small, well-understood pattern.
Integration feasibility. The last release (June 2020) implies Symfony 4/5 and PHP 7.x-era compatibility. Modern Symfony 6/7 changed the KernelEvents::EXCEPTION listener signature and related interfaces; expect fatal errors or deprecations unless the package is patched. With zero stars, zero dependents, and no maintenance for ~5 years, there is no evidence anyone has validated it against current runtimes. Adoption cost is low for the initial install and high for the "make it work and keep it working" portion.
Technical risk.
Key questions.
ProblemNormalizer, an in-house kernel.exception subscriber)?Stack fit. Only viable for Symfony applications on matching versions. For Laravel, do not adopt; implement RFC 7807 formatting inside the app's exception handler (a renderable closure or a small ProblemJson response class) — that keeps the behavior first-party and versionless.
Migration path. Rather than installing the abandoned bundle, prefer extracting its behavior: a first-party kernel.exception listener that (a) prioritizes exceptions, (b) maps exception → status → application/problem+json body, (c) strips internals in production. If the bundle is mandated, vendor/fork it into the repo, pin the commit, and add tests around the listener — this converts an unmaintained dependency into owned code with a known surface.
Compatibility. Before any work: confirm the constraint set installs against the current symfony/http-kernel and PHP version; grep for KernelEvents::EXCEPTION, GetResponseForExceptionEvent vs ExceptionEvent, and PSR-7/ProblemDetails dependencies. Any hard failure here is a stop signal.
Sequencing.
Maintenance. Effectively zero upstream maintenance since 2020; the adopting team becomes the maintainer. Budget ongoing ownership: dependency bumps on every Symfony/PHP upgrade, plus a periodic review for the day the bundle blocks an upgrade.
Support. No vendor support, no active issue triage, no release cadence. Internal expertise is the only support channel; ensure at least one engineer understands the Symfony exception pipeline.
Scaling. Runtime cost is negligible — a single event listener on the exception path, invoked only on errors. Scaling concerns are organizational (who owns the fork), not computational.
Failure modes.
APP_DEBUG handling is mishandled.application/problem+json where application/json was expected, or negotiation not honored.Ramp-up. Low to learn the bundle's surface (small codebase), moderate to own it (requires Symfony event/kernel knowledge and an opinion on the error contract). The real ramp-up is in establishing the RFC 7807 contract and leakage guardrails, which is necessary regardless of build-vs-adopt.
TPM recommendation. Do not take a production dependency on this bundle. Treat it as a reference implementation for an in-house RFC 7807 exception listener (or, on Laravel, a small handler-level formatter). If adoption is unavoidable, fork-and-pin, add tests, and assign an explicit owner before rollout.
How can I help you explore Laravel packages today?