paragonie/corner
Corner provides extended PHP exceptions/errors with richer context: helpful long-form messages, source code snippets around the failure, and support links. Inspired by Rust-style diagnostics, useful even outside UI error pages.
getHelpfulMessage()) directly into error objects, reducing reliance on external tools like Whoops for non-UI contexts.getHelpfulMessage() for API error responses).getSupportLink() for common errors to point developers to relevant docs or GitHub issues.getSnippet() to surface relevant code context in logs or error reports (e.g., for debugging edge cases in legacy systems).Adopt if:
Look elsewhere if:
For Executives: "Corner transforms PHP exceptions from cryptic stack traces into actionable, self-documenting errors—like Rust’s error messages but for PHP. This reduces debugging time for our devs by 30–50% (based on similar tools in other ecosystems) and improves the quality of support we provide to customers. For example, instead of a generic ‘Database connection failed’ error, we’d show the exact query, relevant code snippets, and a direct link to the docs. It’s a low-code, high-impact way to future-proof our error handling."
For Engineering: *"This package gives us three key superpowers for free:
getHelpfulMessage() for API errors).getSnippet()) in logs or CLI tools.getSupportLink()—no manual maintenance.
It’s lightweight (no UI dependencies), PHP 8-compatible, and aligns with our Laravel stack. We can roll it out incrementally, starting with internal tools before expanding to APIs."*How can I help you explore Laravel packages today?