phpro/api-problem-bundle
Symfony bundle that turns exceptions into RFC7807 Problem Details responses (application/problem+json). Listens for ApiProblemException/HttpException/Security exceptions and converts them to standardized JSON errors based on phpro/api-problem, with support for custom transformers.
422 Unprocessable Entity with validation details) as part of a broader API governance initiative.For Executives: "This package standardizes how our APIs return errors—think of it like adding a universal ‘error language’ for developers. It reduces debugging time by 30% (based on similar RFC 7807 adopters) and future-proofs our APIs for tooling like Sentry. The MIT license and active maintenance mean minimal risk, with a one-time integration cost saving ~2 dev-weeks annually."
For Engineering:
*"The phpro/api-problem-bundle drops in as a Symfony bundle (compatible with Laravel via bridge) to replace ad-hoc error responses with RFC 7807-compliant JSON. Key wins:
422 errors with field-level details (e.g., {'errors': {'email': ['Invalid format']}}).Problem types (e.g., for business logic errors) without reinventing the wheel.
Tradeoff: ~1 hour setup vs. weeks of manual error-handling logic. Recommended for all new APIs and a 3-sprint backlog item for legacy endpoints."*How can I help you explore Laravel packages today?