Skip to content

Commit dee6ec6

Browse files
committed
[Messenger] Reset traceable buses
1 parent 66f7b72 commit dee6ec6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

DataCollector/MessengerDataCollector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public function getName()
6767
public function reset()
6868
{
6969
$this->data = array();
70+
foreach ($this->traceableBuses as $traceableBus) {
71+
$traceableBus->reset();
72+
}
7073
}
7174

7275
private function collectMessage(string $busName, array $tracedMessage)

TraceableMessageBus.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,9 @@ public function getDispatchedMessages(): array
5252
{
5353
return $this->dispatchedMessages;
5454
}
55+
56+
public function reset()
57+
{
58+
$this->dispatchedMessages = array();
59+
}
5560
}

0 commit comments

Comments
 (0)