Skip to content

Commit bfc7401

Browse files
authored
Lumen Context fix (#922)
1 parent bea6615 commit bfc7401

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Sentry/Laravel/Integration/LaravelContextIntegration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Sentry\Laravel\Integration;
44

5-
use Illuminate\Support\Facades\Context;
5+
use Illuminate\Log\Context\Repository as ContextRepository;
66
use Sentry\Event;
77
use Sentry\EventHint;
88
use Sentry\EventType;
@@ -15,7 +15,7 @@ class LaravelContextIntegration implements IntegrationInterface
1515
public function setupOnce(): void
1616
{
1717
// Context was introduced in Laravel 11 so we need to check if we can use it otherwise we skip the event processor
18-
if (!class_exists(Context::class)) {
18+
if (!class_exists(ContextRepository::class)) {
1919
return;
2020
}
2121

@@ -30,7 +30,7 @@ public function setupOnce(): void
3030
return $event;
3131
}
3232

33-
$event->setContext('laravel', Context::all());
33+
$event->setContext('laravel', app(ContextRepository::class)->all());
3434

3535
return $event;
3636
});

0 commit comments

Comments
 (0)