yiisoft/friendly-exception
Defines FriendlyExceptionInterface for exceptions that provide a human-friendly name and suggested solution. Lets error handlers detect these exceptions and display clearer, actionable information on error pages. Includes guidance for writing short, markdown-based solutions.
Developer Experience (DX) Initiatives:
@throws annotations).Roadmap Priorities:
@ErrorHandler annotations for custom logic).Build vs. Buy:
Whoops for new PHP versions).Whoops on PHP 7.4+) with a supported, actively maintained alternative.Use Cases:
FatalError improvements in PHP 8.0+).FatalError handling, JIT compatibility).symfony/error-handler instead).Whoops with custom patches).*"This update future-proofs our PHP stack by requiring PHP 7.4+, aligning with Laravel 9+/Symfony 6+ and enabling:
FatalError handling).Whoops).Ask: ‘Should we upgrade our PHP version to leverage this package and cut debugging time by 20%?’"
*"Key Changes in 1.2.0:
PHP 7.4–8.5 Support:
FatalError improvements, JIT).7.4.* || 8.0 - 8.5 (future-proof for PHP 9.x).Modern PHP Features:
@ErrorHandler in PHP 8.1+).Migration Impact:
Whoops or old handlers with this package in <1 hour.Recommendation:
Example Setup (Laravel):
// config/app.php
'error_handler' => \Yiisoft\FriendlyException\Renderer\Renderer::class,
Trade-off: No PHP <7.4 support, but gains modern PHP tooling compatibility."
How can I help you explore Laravel packages today?