hoa/exception
Hoa\Exception is a PHP library for richer exception handling. It treats exceptions as objects with formatted, parameterized messages, supports exception groups, chaining, and customizable rendering, making error reporting clearer and more structured in PHP applications.
hoa/exception is the kind of package that shows up in a dependency tree rather than in a design doc. The decision it actually informs is whether to standardize structured exception metadata (IDs, attributes, grouping, error-to-exception conversion) in-house on top of Laravel's handler, or inherit it from an upstream library. Given the package's state, the answer for greenfield work is "build/paved road," not "adopt."Consider it only in narrow, largely inherited situations:
Hoa\Compiler, Hoa\Ruler, Hoa\Regex, Hoa\Zformat and similar — where Hoa\Exception arrives as a transitive dependency. In that case the question is containment, not adoption: pin the version, wrap the boundaries, and avoid letting its exception types leak into your domain layer.Handler (with reportable/renderable) nor Symfony's ErrorHandler is available.Hoa\Exception, where understanding the original semantics matters more than shipping.Look elsewhere, decisively, when:
App\Exceptions\Handler, report()/render() hooks, renderable/reportable closures, and typed exception classes. Adding a second exception base class creates two parallel error pipelines and splits your Sentry/Flare integration.To executives — one line: This is an abandoned 2017 PHP library that we would not choose today; the recommendation is not to adopt it, and if it's already in the tree, to scope its removal as low-effort technical debt rather than treat it as a strategic component.
The substance: hoa/exception provides structured exceptions — IDs, attributes, exception grouping, and PHP-error-to-exception conversion. That's a reasonable idea, but the package is archived, has had no release since August 2017, and has no meaningful dependent community. Its functionality is already covered, better integrated, by Laravel's built-in exception handler plus our error-tracking vendor. Adopting it would introduce a second, parallel error pipeline, complicate framework and PHP upgrades, and add a dependency with no upstream support.
To engineering — the asks: (1) Confirm whether the package appears anywhere in composer.lock as a transitive dependency and, if so, which path pulls it in. (2) If present, wrap or isolate it behind our own exception boundary so it can be swapped without touching domain code. (3) Add a maintenance-recency rule to dependency review so archived packages require an explicit named owner and a removal plan before approval.
Framing: Low opportunity, high clarity. The cheap decision — don't adopt — is right, and the residual work is a small, well-bounded cleanup item rather than a roadmap risk.
How can I help you explore Laravel packages today?