Skip to content

Commit f418241

Browse files
committed
Fix not setting correct SDK ID/version when running test command
1 parent cad98d8 commit f418241

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Sentry/Laravel/Console/TestCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Support\Str;
88
use Psr\Log\AbstractLogger;
99
use Sentry\ClientBuilder;
10+
use Sentry\Laravel\Version;
1011
use Sentry\State\Hub;
1112
use Sentry\State\HubInterface;
1213
use Sentry\Tracing\SpanContext;
@@ -99,6 +100,10 @@ public function handle(): int
99100
return 1;
100101
}
101102

103+
// Set the Laravel SDK identifier and version
104+
$clientBuilder->setSdkIdentifier(Version::SDK_IDENTIFIER);
105+
$clientBuilder->setSdkVersion(Version::SDK_VERSION);
106+
102107
// We set a logger so we can surface errors thrown internally by the SDK
103108
$clientBuilder->setLogger(new class($this) extends AbstractLogger {
104109
private $command;

0 commit comments

Comments
 (0)