1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +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:
Franz Liedke
2019-08-10 11:03:44 +02:00
parent 9f71e2c3cb
commit d06493c61e
6 changed files with 12 additions and 11 deletions

View File

@@ -71,6 +71,6 @@ class ErrorServiceProvider extends AbstractServiceProvider
);
});
$this->app->singleton(Reporter::class, LogReporter::class);
$this->app->tag(LogReporter::class, Reporter::class);
}
}