mirror of
https://github.com/flarum/core.git
synced 2025-08-06 00:17:31 +02:00
Support multiple error reporters
The error handling middleware now expects an array of reporters. Extensions can register new reporters in the container like this: use Flarum\Foundation\ErrorHandling\Reporter; $container->tag(NewReporter::class, Reporter::class); Note that this is just an implementation detail and will be hidden behind an extender.
This commit is contained in:
@@ -53,7 +53,7 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
$pipe->pipe(new HttpMiddleware\HandleErrors(
|
||||
$app->make(Registry::class),
|
||||
$app->make(JsonApiRenderer::class),
|
||||
$app->make(Reporter::class)
|
||||
$app->tagged(Reporter::class)
|
||||
));
|
||||
|
||||
$pipe->pipe($app->make(HttpMiddleware\ParseJsonBody::class));
|
||||
|
Reference in New Issue
Block a user