Skip to content

Commit

Permalink
Pass Bowler exception handler dependencies via a service container
Browse files Browse the repository at this point in the history
  • Loading branch information
adiachenko committed Sep 24, 2019
1 parent 4846589 commit 5bcce85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/BowlerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ public function register()
return $app['vinelab.bowler.registrator'];
});

$this->app->bind(BowlerExceptionHandler::class, function ($app) {
return new BowlerExceptionHandler(
$app->make(ExceptionHandler::class),
$app->make('log'),
$app->make('config')
);
});

$this->app->bind(Connection::class, function () {
// Bind connection to env configuration
$rbmqHost = config('bowler.rabbitmq.host');
Expand Down

0 comments on commit 5bcce85

Please sign in to comment.