Skip to content

Commit

Permalink
Lumen Context fix (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive authored Jul 17, 2024
1 parent bea6615 commit bfc7401
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Sentry/Laravel/Integration/LaravelContextIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Sentry\Laravel\Integration;

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

Expand All @@ -30,7 +30,7 @@ public function setupOnce(): void
return $event;
}

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

return $event;
});
Expand Down

0 comments on commit bfc7401

Please sign in to comment.