Skip to content

Commit 8be83a9

Browse files
panki3aNyholm
authored andcommitted
Update CacheDataCollector.php (#88)
* Update CacheDataCollector.php add reset method, which implement Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface and solve deprication User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Cache\CacheBundle\DataCollector\CacheDataCollector". * Update CacheDataCollector.php update code style
1 parent 4f89371 commit 8be83a9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/DataCollector/CacheDataCollector.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ public function collect(Request $request, Response $response, \Exception $except
6969
$this->data['total']['statistics'] = $this->calculateTotalStatistics();
7070
}
7171

72+
/**
73+
* {@inheritdoc}
74+
*/
75+
public function reset()
76+
{
77+
$empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []];
78+
$this->data = ['instances' => $empty, 'total' => $empty];
79+
}
80+
7281
/**
7382
* To be compatible with many versions of Symfony.
7483
*

0 commit comments

Comments
 (0)