Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Exception Laravel Package

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.

View on GitHub
Deep Wiki
Context7

The Hoa\Exception library.

Frequently asked questions about Exception
Is hoa/exception compatible with Laravel 10 and Laravel 11?
Not in a supported way. Hoa\Exception is a standalone PHP library, not a Laravel integration, and its last release predates PHP 8 features required by modern Laravel. You can install it with Composer, but compatibility with Laravel 10 or 11 on PHP 8.1 and newer must be verified in a spike before adoption.
How do I install hoa/exception in a Laravel project with Composer?
Run composer require hoa/exception, but expect it to pull transitive Hoa packages such as Hoa\Consistency. It has no service provider, facade, or config file, so there is nothing to register in Laravel. Treat it as a plain library and keep it isolated from application-facing code.
Does hoa/exception integrate with Laravel's exception handler and report method?
Only at the base \Throwable level because Hoa exceptions extend \Exception. Laravel's Handler::report and render, dontReport, $internalDontReport, WithExceptions mappings, and withoutExceptionHandling() will not understand Hoa-specific identifiers, severities, or groups unless you add explicit wiring. Do not assume Laravel will handle Hoa semantics automatically.
Can Hoa\Exception\Group replace Laravel ValidationException and MessageBag for aggregating errors?
It can aggregate errors because Group implements IteratorAggregate, Countable, and ArrayAccess, but it is not a drop-in replacement for Laravel validation flows. ValidationException and MessageBag are wired into Laravel's request lifecycle, JSON responses, and testing helpers. For most Laravel apps, use native validation errors and reserve Hoa Group for a narrow internal use case if any.
Does hoa/exception support PHP 8.2, 8.3, and PHP 8.4?
That is unproven from the package metadata. The 2017 release predates PHP 7.2 object types, 7.4 typed properties, 8.0 unions, 8.1 never, and 8.2 dynamic-property deprecation, so PHP 8.2 through 8.4 compatibility must be tested rather than assumed. Also confirm the transitive Hoa\Consistency bootstrap works on the exact PHP versions your Laravel app uses.
Will Hoa exceptions serialize safely when Laravel queues a job?
Queue serialization of Hoa\Exception\Group and deep chained exceptions is unverified and risky. Laravel jobs can pass exceptions through SerializesModels, failed_jobs, Horizon, and Sentry payloads, and complex aggregates may truncate or fail to serialize. Test throw, report, queue serialize, failed, and monitoring payloads end to end before relying on it.
How does hoa/exception compare with Laravel's native retry helper and custom exceptions?
Laravel already provides retry() for backoff, Reportable and Renderable contracts for handler behavior, and ValidationException with MessageBag for aggregation. Hoa's net-new value is narrow, mainly an aggregate class and a marker interface, and it does not hook into Laravel's handler. For greenfield Laravel services, native tools plus a small app-owned AggregateException are usually a better fit.
Is hoa/exception maintained, and does it have security risks?
No, the repository is archived and the last release was in 2017, with no documented security-response path. Archived transitive Hoa dependencies create permanent SCA and Dependabot noise, so adopting it may require a policy exception. If you must use it, document ownership and a patch or vendoring plan before it reaches production.
Can I use hoa/exception with Laravel's WithExceptions, dontReport, and log context features?
Only with explicit adapters. Laravel's WithExceptions, dontReport, $internalDontReport, report throttling, deduplication, and log-context enrichment are configured around Laravel-native exception types and handler behavior. A custom Hoa hierarchy can silently bypass those controls unless you translate Hoa metadata into Laravel's reporting pipeline.
What is the safest way to adopt hoa/exception in a legacy Laravel codebase?
Confine it to one bounded context, such as a legacy batch-import or ETL module, and forbid Hoa types from leaking into controllers, jobs, or public API contracts. Define app-owned exception types and keep Hoa as a private implementation detail behind an adapter. Run a shadow comparison against a native implementation and be prepared to delete Hoa while keeping the adapter.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console