componenta / error-renderer-plates
League Plates renderer integration for Componenta error handling
Package info
github.com/componenta/error-renderer-plates
pkg:composer/componenta/error-renderer-plates
v1.0.0
2026-06-15 10:58 UTC
Requires
- php: ^8.4
- componenta/error-handler: ^1.0
- league/plates: ^3.6
README
League Plates renderer integration for componenta/error-handler. The package renders errors through bundled Plates templates.
Installation
composer require componenta/error-renderer-plates
Main API
use Componenta\Error\Renderer\PlatesRenderer; use League\Plates\Engine; $engine = new Engine(__DIR__ . '/templates'); $renderer = new PlatesRenderer($engine); $html = $renderer->render($exception, $context);
PlatesRenderer requires a League\Plates\Engine. The constructor also accepts:
$defaultTemplate, used when no specific template matches;$debug, which controls whether file, line, trace, and previous exception data are passed to templates;$templateMap, where keys may be exception class names or HTTP status codes.
Bundled templates are stored in templates/ and include generic error, 404, and 500 pages.
Boundary
This package only provides a renderer. It does not provide the application template helper from componenta/templater-app and does not handle response emission.