Skip to content

WhoopsPlugin

Opt-in entry point for the Whoops developer-exception renderer.

Adding this class to the plugins config key registers WhoopsRenderer as the renderer ErrorHandlingMiddleware uses when core.developer_exceptions is true (see ExceptionRendererRegistry); without it, core.developer_exceptions=true still just falls back to SafeRenderer.

Unlike CsrfPlugin (kept on by default — CSRF protection is a security default, not merely a packaging concern), Whoops has no core-default registration: nothing bad happens if it’s simply absent, so it follows the same fully opt-in model as McpPlugin and the ORM adapter plugins.

final class WhoopsPlugin implements PluginInterface

ImplementsPluginInterface
SourceWhoopsPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidRegisters WhoopsRenderer as the developer-exception renderer.

public function register(PluginRegistrar $registrar): void

Registers WhoopsRenderer as the developer-exception renderer.

The renderer is supplied as a factory, so Whoops is only constructed if an exception actually has to be rendered with developer detail enabled.

ParameterTypeDescription
$registrarPluginRegistrar