Skip to content

Commit

Permalink
Merge pull request #56 from Vinelab/fix/handler-dependencies
Browse files Browse the repository at this point in the history
Pass Bowler exception handler dependencies via a service container
  • Loading branch information
adiachenko authored Sep 24, 2019
2 parents 259fa8c + 5bcce85 commit 5565a99
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 5565a99

Please sign in to comment.