minor #27110 [Messenger] Reset traceable buses (ogizanagi)
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Reset traceable buses
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
So the dispatched messages list is empty on new requests without rebooting the kernel.
Commits
-------
c68887e1e8
[Messenger] Reset traceable buses
This commit is contained in:
commit
daf7ac064b
@ -67,6 +67,9 @@ class MessengerDataCollector extends DataCollector implements LateDataCollectorI
|
||||
public function reset()
|
||||
{
|
||||
$this->data = array();
|
||||
foreach ($this->traceableBuses as $traceableBus) {
|
||||
$traceableBus->reset();
|
||||
}
|
||||
}
|
||||
|
||||
private function collectMessage(string $busName, array $tracedMessage)
|
||||
|
@ -52,4 +52,9 @@ class TraceableMessageBus implements MessageBusInterface
|
||||
{
|
||||
return $this->dispatchedMessages;
|
||||
}
|
||||
|
||||
public function reset()
|
||||
{
|
||||
$this->dispatchedMessages = array();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user