Skip to content

Commit 5e85982

Browse files
committed
Change share to singleton
The `share` method has been removed in Laravel 5.4. Documentation recommends using the `singleton` method instead.
1 parent be232a8 commit 5e85982

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RollbarServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function register()
3939

4040
$app = $this->app;
4141

42-
$this->app['RollbarNotifier'] = $this->app->share(function ($app) {
42+
$this->app['RollbarNotifier'] = $this->app->singleton(function ($app) {
4343
// Default configuration.
4444
$defaults = [
4545
'environment' => $app->environment(),
@@ -59,7 +59,7 @@ public function register()
5959
return $rollbar;
6060
});
6161

62-
$this->app['Jenssegers\Rollbar\RollbarLogHandler'] = $this->app->share(function ($app) {
62+
$this->app['Jenssegers\Rollbar\RollbarLogHandler'] = $this->app->singleton(function ($app) {
6363
$level = getenv('ROLLBAR_LEVEL') ?: $app['config']->get('services.rollbar.level', 'debug');
6464

6565
return new RollbarLogHandler($app['RollbarNotifier'], $app, $level);

0 commit comments

Comments
 (0)