Skip to content

Commit 64f4fce

Browse files
authored
Merge pull request #20 from lunetics/patch-1
Reduce possibility of breaking the symfony Toolbar
2 parents c590470 + fa27b32 commit 64f4fce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DataCollector/MercureDataCollector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ public function collect(Request $request, Response $response, \Throwable $except
3636
'count' => 0,
3737
'duration' => 0.0,
3838
'memory' => 0,
39-
'publishers' => iterator_to_array($this->publishers),
39+
'publishers' => [],
4040
];
4141

42+
foreach ($this->publishers as $name => $publisher) {
43+
$this->data['publishers'][$name]['messages'] = $publisher->getMessages();
44+
}
45+
4246
foreach ($this->publishers as $name => $publisher) {
4347
$this->data['duration'] += $publisher->getDuration();
4448
$this->data['memory'] += $publisher->getMemory();

0 commit comments

Comments
 (0)