Skip to content

Commit c1393cd

Browse files
authored
refactor(sentry): remove friendsofhyperf/support dependency (#974)
Replace RedisCommand usage with native event method getFormatCommand() to eliminate the dependency on friendsofhyperf/support package, reducing package coupling and maintenance overhead. Co-authored-by: Deeka Wong <[email protected]>
1 parent b8a0053 commit c1393cd

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"pull-request": "https://github.com/friendsofhyperf/components/pulls"
2323
},
2424
"require": {
25-
"friendsofhyperf/support": "~3.2.0",
2625
"hyperf/command": "~3.2.0",
2726
"hyperf/context": "~3.2.0",
2827
"hyperf/coroutine": "~3.2.0",

src/Tracing/Listener/EventHandleListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use FriendsOfHyperf\Sentry\Util\Carrier;
1919
use FriendsOfHyperf\Sentry\Util\CoContainer;
2020
use FriendsOfHyperf\Sentry\Util\SqlParser;
21-
use FriendsOfHyperf\Support\RedisCommand;
2221
use Hyperf\Amqp\Event as AmqpEvent;
2322
use Hyperf\Amqp\Message\ConsumerMessage;
2423
use Hyperf\AsyncQueue\Event as AsyncQueueEvent;
@@ -466,7 +465,7 @@ protected function handleRedisCommandExecuted(RedisEvent\CommandExecuted $event)
466465

467466
$pool = $this->container->get(RedisPoolFactory::class)->getPool($event->connectionName);
468467
$config = $this->config->get('redis.' . $event->connectionName, []);
469-
$redisStatement = (string) new RedisCommand($event->command, $event->parameters);
468+
$redisStatement = $event->getFormatCommand();
470469

471470
trace(
472471
function (Scope $scope) use ($event) {

0 commit comments

Comments
 (0)