Skip to content

Commit

Permalink
made the kernel optional in all data collectors
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 22, 2012
1 parent 3341c8e commit 5e359d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -18,7 +18,7 @@
<services>
<service id="data_collector.config" class="%data_collector.config.class%" public="false">
<tag name="data_collector" template="WebProfilerBundle:Collector:config" id="config" priority="255" />
<call method="setKernel"><argument type="service" id="kernel" /></call>
<call method="setKernel"><argument type="service" id="kernel" on-invalid="ignore" /></call>
</service>

<service id="data_collector.request" class="%data_collector.request.class%">
Expand All @@ -42,7 +42,7 @@

<service id="data_collector.time" class="%data_collector.time.class%" public="false">
<tag name="data_collector" template="WebProfilerBundle:Collector:time" id="time" priority="255" />
<argument type="service" id="kernel" />
<argument type="service" id="kernel" on-invalid="ignore" />
</service>

<service id="data_collector.memory" class="%data_collector.memory.class%" public="false">
Expand Down
Expand Up @@ -31,7 +31,7 @@ class ConfigDataCollector extends DataCollector
*
* @param KernelInterface $kernel A KernelInterface instance
*/
public function setKernel(KernelInterface $kernel)
public function setKernel(KernelInterface $kernel = null)
{
$this->kernel = $kernel;
}
Expand Down

0 comments on commit 5e359d3

Please sign in to comment.