|
@@ -63,11 +63,11 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
$plugin->load($config, $container); |
|
64
|
64
|
} |
|
65
|
65
|
|
|
66
|
|
- $clientsWithLogging = array_filter($config['clients'], function ($options) { |
|
|
66
|
+ $clientsWithLogging = array_filter($config['clients'], function($options) { |
|
67
|
67
|
return $options['logging'] === true; |
|
68
|
68
|
}); |
|
69
|
69
|
|
|
70
|
|
- if ($logging || count($clientsWithLogging)>0) { |
|
|
70
|
+ if ($logging || count($clientsWithLogging) > 0) { |
|
71
|
71
|
$this->defineTwigDebugExtension($container); |
|
72
|
72
|
$this->defineLogger($container); |
|
73
|
73
|
$this->defineDataCollector($container, $config['slow_response_time'] / 1000); |
|
@@ -79,7 +79,7 @@ discard block |
|
|
block discarded – undo |
|
79
|
79
|
foreach ($config['clients'] as $name => $options) { |
|
80
|
80
|
$argument = [ |
|
81
|
81
|
'base_uri' => $options['base_url'], |
|
82
|
|
- 'handler' => $this->createHandler($container, $name, $options, $options['logging'] ?? $logging === true, $profiling) |
|
|
82
|
+ 'handler' => $this->createHandler($container, $name, $options, $options['logging'] ?? $logging === true, $profiling) |
|
83
|
83
|
]; |
|
84
|
84
|
|
|
85
|
85
|
// if present, add default options to the constructor argument for the Guzzle client |
|
@@ -124,7 +124,7 @@ discard block |
|
|
block discarded – undo |
|
124
|
124
|
$container->setDefinition($eventServiceName, $eventService); |
|
125
|
125
|
|
|
126
|
126
|
// Create the event Dispatch Middleware |
|
127
|
|
- $eventExpression = new Expression(sprintf("service('%s').dispatchEvent()", $eventServiceName)); |
|
|
127
|
+ $eventExpression = new Expression(sprintf("service('%s').dispatchEvent()", $eventServiceName)); |
|
128
|
128
|
|
|
129
|
129
|
$handler = new Definition(HandlerStack::class); |
|
130
|
130
|
$handler->setFactory([HandlerStack::class, 'create']); |