phauthentic/problem-details-symfony-bundle
A Symfony bundle that turns exceptions and errors into RFC 7807 problem details JSON responses, wiring the phauthentic problem-details library into your app so APIs return consistent, spec-compliant error payloads with minimal configuration.
type URIs, title, and status become a versioned surface that partner integrators, SDKs, and dashboards key on. Once shipped, changing a type URI is a breaking change with a deprecation cycle. This package is a vehicle for that decision — the decision outlives the package.application/problem+json via ProblemNormalizer in production error responses. Before funding adoption, confirm what the framework gives us free — the incremental value of a third-party bundle over core may be limited to the per-exception type-URI mapping.type. Use cases where it does not: internal-only services, GraphQL APIs (different error model), or teams with fewer than ~5 distinct exception types.phauthentic/problem-details library or equivalent — the bundle itself is not adoptable.Consider it when:
phauthentic/problem-details library, so the bundle is an adapter over a dependency we've accepted.Look elsewhere when:
ProblemNormalizer output is close enough, the cheapest correct move is to align with it and add a thin mapping layer for type URIs.Recommendation: adopt the pattern, not the package. Implement RFC 9457 responses as a small internally owned listener/middleware, optionally taking the underlying problem-details library as a low-risk leaf dependency. Revisit this bundle only if our exception-mapping surface grows to the point where configuration beats code — and only after the maintainer publishes a changelog and demonstrates a framework-upgrade track record. Re-evaluate at the next Symfony major.
Executive summary (30 seconds). RFC 9457 is the current standard for machine-readable API errors, and it's worth adopting — it removes ambiguity for partners and ticks a box in enterprise reviews. This specific package is not the way to do it: a single-maintainer, 1-star Symfony bundle with no changelog sitting on the code path of every request. The capability is small enough to own: roughly two engineer-days, no lock-in, no supply-chain exposure. Recommendation: fund the standard, not the dependency.
To engineering. We're standardizing error payloads on RFC 9457 (type, title, status, detail, instance). Implement it as our own exception listener plus a ProblemDetails response factory, with exception→type-URI mapping in config. Take a leaf library only if it stays swappable behind our own interface. Note that the evaluated bundle is Symfony-only and can't be used here regardless — and that Symfony's ProblemNormalizer should be checked first to avoid duplicating what we get free. Contract-test the error shape so it becomes a regression surface rather than an aspiration.
To commercial / partnerships. Partners and SDK consumers get a stable, documented error schema instead of our ad-hoc JSON. We commit to type URIs as a versioned interface: additions are non-breaking, any change to an existing type gets a deprecation window. We should say this explicitly to API consumers, because the commitment — not the implementation — is what the partner integration team cares about, and the commitment is what we must not casually break later.
Risk framing, if asked why not the package. The failure mode is not that it breaks today; it's abandonment at the next Symfony major, combined with a 1.0.0 shipped without release notes so upgrade behaviour is unverifiable. On a global exception path, that risk is paid on every request. Our mitigation — owning the ~150 lines — costs less than the review, monitoring, and eventual migration the dependency would require.
Ask. Approve the two-day build under the API maturity roadmap item; approve the public error-schema versioning policy alongside it; and record the decision to decline the package so it isn't re-litigated at the next dependency sweep.
How can I help you explore Laravel packages today?