libero/api-problem-bundle
Libero API Problem Bundle adds RFC 7807 Problem Details support to Symfony APIs, helping you return consistent, machine-readable error responses. Map exceptions to standard problem types and keep JSON error payloads predictable across services.
type URI catalog — behind a small internal interface. That keeps you spec-compliant while owning the maintenance.type values and extension fields. That is a genuine product artifact: an error catalog is what makes support triage, client retry logic, and documentation coherent. Use this package's extension model as the design template even if the code is discarded.Consider the pattern — and evaluate this code — when:
Look elsewhere (or build in-house) when:
Adoption criteria if a spike proceeds: pin the exact version, isolate behind an internal adapter, verify PHP/Symfony constraints against your platform, confirm the logging behavior added in v0.2.0 is configurable and PII-safe, and schedule a review with a predefined trigger to replace it.
To executives (one paragraph): Our API's error responses are an under-managed part of the product. Today every failure looks slightly different, which pushes cost onto our customers' engineers and onto our support team. There is a published internet standard, RFC 7807, for exactly this. A small open-source package implements it, but it is archived, unmaintained, and built for a framework we do not use — so the recommendation is to adopt the standard and build a thin internal implementation rather than take the dependency. Expected outcome: faster client integration, fewer "what does this error mean" tickets, and a documented error catalog we control. Cost is roughly one to two sprints of engineering, and risk is low because the format is a public standard — if we later change implementation, clients see no difference.
To engineering (summary): We are standardizing API error payloads on application/problem+json. Do not vendor libero/api-problem-bundle: it is Symfony-only, last released February 2019, archived, and has zero dependents and no security policy. Treat it as a design reference. Deliver a framework-native middleware that (1) maps domain exceptions to Problem Details with a stable type URI per error class, (2) normalizes validation failures into a consistent errors extension, (3) allows custom extension members without breaking the base shape, and (4) logs with a Laravel/Symfony-native logger — sanitized, level-configurable, and never blocking the response. Keep the implementation behind an internal interface so the transport format is swappable, ship the error catalog alongside it, and add contract tests that assert the wire format per endpoint. One spike, then a staged rollout behind a feature flag.
To support and docs: this gives you a single structured artifact to document and triage from — error type, human-readable title, and a canonical link. Treat the error catalog as a first-class docs deliverable, not an afterthought.
How can I help you explore Laravel packages today?