We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62d5c9d commit 1f5f0b5Copy full SHA for 1f5f0b5
src/EventListener/ConsoleListener.php
@@ -33,9 +33,14 @@ public function onConsoleCommand(ConsoleCommandEvent $event): void
33
{
34
$command = $event->getCommand();
35
36
+ $commandName = null;
37
+ if ($command) {
38
+ $commandName = $command->getName();
39
+ }
40
+
41
SentryBundle::getCurrentHub()
- ->configureScope(function (Scope $scope) use ($command): void {
- $scope->setTag('command', $command ? $command->getName() : 'N/A');
42
+ ->configureScope(static function (Scope $scope) use ($commandName): void {
43
+ $scope->setTag('command', $commandName ?? 'N/A');
44
});
45
}
46
0 commit comments