From 575b170ac0e50685025dfb4e454137f0acc50798 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Wed, 16 Aug 2023 18:01:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20SentryHub=20singleton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/Service/Sentry.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Classes/Service/Sentry.php b/Classes/Service/Sentry.php index 40553e7..10c7909 100644 --- a/Classes/Service/Sentry.php +++ b/Classes/Service/Sentry.php @@ -45,13 +45,11 @@ protected function setup(): void $options['release'] = shell_exec('git rev-parse HEAD'); } + $builder = ClientBuilder::create(array_filter($options)); if ($this->config->isQueueEnabled()) { - $builder = ClientBuilder::create(array_filter($options)); $builder->setTransportFactory(new TransportFactory()); - SentrySdk::getCurrentHub()->bindClient($builder->getClient()); - } else { - init(array_filter($options)); } + SentrySdk::getCurrentHub()->bindClient($builder->getClient()); configureScope(fn(Scope $scope) => $this->scopeConfig->apply($scope)); }