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