Skip to content

Commit 4e78995

Browse files
SCIFstayallive
andcommitted
Added alias for Hub to container (#249)
* #248: Added an alias HubInterface to container * CS Co-authored-by: Alex Bouma <[email protected]>
1 parent 89a3854 commit 4e78995

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Sentry/Laravel/ServiceProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Sentry\State\Hub;
66
use Sentry\ClientBuilder;
7+
use Sentry\State\HubInterface;
78
use Illuminate\Log\LogManager;
89
use Laravel\Lumen\Application as Lumen;
910
use Sentry\Integration\IntegrationInterface;
@@ -126,6 +127,8 @@ protected function configureAndRegisterClient(): void
126127

127128
return Hub::getCurrent();
128129
});
130+
131+
$this->app->alias(self::$abstract, HubInterface::class);
129132
}
130133

131134
/**

0 commit comments

Comments
 (0)