From f4182418a4bd3872b94fba8ecddf9541bc0d0a8e Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 6 Oct 2022 17:49:07 +0200 Subject: [PATCH 1/2] Fix not setting correct SDK ID/version when running test command --- src/Sentry/Laravel/Console/TestCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Sentry/Laravel/Console/TestCommand.php b/src/Sentry/Laravel/Console/TestCommand.php index 0623d5fd..d921317d 100644 --- a/src/Sentry/Laravel/Console/TestCommand.php +++ b/src/Sentry/Laravel/Console/TestCommand.php @@ -7,6 +7,7 @@ use Illuminate\Support\Str; use Psr\Log\AbstractLogger; use Sentry\ClientBuilder; +use Sentry\Laravel\Version; use Sentry\State\Hub; use Sentry\State\HubInterface; use Sentry\Tracing\SpanContext; @@ -99,6 +100,10 @@ public function handle(): int return 1; } + // Set the Laravel SDK identifier and version + $clientBuilder->setSdkIdentifier(Version::SDK_IDENTIFIER); + $clientBuilder->setSdkVersion(Version::SDK_VERSION); + // We set a logger so we can surface errors thrown internally by the SDK $clientBuilder->setLogger(new class($this) extends AbstractLogger { private $command; From 07927b41e88c122fd79a58d558c2d9944062aaf7 Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 6 Oct 2022 17:53:46 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c09af0ed..4bbed914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Fix not setting the correct SDK ID and version when running the `sentry:test` command (#582) + ## 2.14.0 - Fix not listening to queue events because `QueueManager` is registered as `queue` in the container and not by it's class name (#568)