Skip to content

Commit 1b72360

Browse files
committed
Do not add stopwatch if already added
1 parent 69cb889 commit 1b72360

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
### Added
77

88
- Support for BatchClient
9+
- The stopwatch plugin in included by default when using profiling.
910

1011
### Changed
1112

DependencyInjection/HttplugExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ private function configureClient(ContainerBuilder $container, $name, array $argu
218218
$pluginClientOptions = [];
219219

220220
if ($profiling) {
221-
// Add the stopwatch plugin
222-
array_unshift($arguments['plugins'], 'httplug.plugin.stopwatch');
221+
if (!in_array('httplug.plugin.stopwatch', $arguments['plugins'])) {
222+
// Add the stopwatch plugin
223+
array_unshift($arguments['plugins'], 'httplug.plugin.stopwatch');
224+
}
223225

224226
// Tell the plugin journal what plugins we used
225227
$container

0 commit comments

Comments
 (0)