@@ -217,6 +217,9 @@ private function configureClient(ContainerBuilder $container, $name, array $argu
217
217
$ pluginClientOptions = [];
218
218
219
219
if ($ profiling ) {
220
+ // Add the stopwatch plugin
221
+ array_unshift ($ arguments ['plugins ' ], 'httplug.plugin.stopwatch ' );
222
+
220
223
// Tell the plugin journal what plugins we used
221
224
$ container
222
225
->getDefinition ('httplug.collector.plugin_journal ' )
@@ -330,6 +333,12 @@ private function registerAutoDiscoverableClient(ContainerBuilder $container, $na
330
333
$ pluginClientOptions = [];
331
334
332
335
if ($ profiling ) {
336
+ // Tell the plugin journal what plugins we used
337
+ $ container
338
+ ->getDefinition ('httplug.collector.plugin_journal ' )
339
+ ->addMethodCall ('setPlugins ' , [$ name , ['httplug.plugin.stopwatch ' ]])
340
+ ;
341
+
333
342
$ debugPluginServiceId = $ this ->registerDebugPlugin ($ container , $ serviceId );
334
343
335
344
$ pluginClientOptions ['debug_plugins ' ] = [new Reference ($ debugPluginServiceId )];
@@ -338,7 +347,7 @@ private function registerAutoDiscoverableClient(ContainerBuilder $container, $na
338
347
$ container
339
348
->register ($ serviceId , DummyClient::class)
340
349
->setFactory ([PluginClientFactory::class, 'createPluginClient ' ])
341
- ->setArguments ([[], $ factory , [], $ pluginClientOptions ])
350
+ ->setArguments ([[new Reference ( ' httplug.plugin.stopwatch ' ) ], $ factory , [], $ pluginClientOptions ])
342
351
;
343
352
344
353
return $ serviceId ;
0 commit comments