componenta/error-renderer-plates

League Plates renderer integration for Componenta error handling

Maintainers

Package info

github.com/componenta/error-renderer-plates

pkg:composer/componenta/error-renderer-plates

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-15 10:58 UTC

This package is auto-updated.

Last update: 2026-06-15 12:06:39 UTC


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.