From 9311ae19786dbe328beca071240d587ea1228412 Mon Sep 17 00:00:00 2001 From: Adrien Roches Date: Thu, 2 Nov 2017 11:54:08 +0100 Subject: [PATCH] [FIX] Add names to middlewares --- src/DependencyInjection/EightPointsGuzzleExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DependencyInjection/EightPointsGuzzleExtension.php b/src/DependencyInjection/EightPointsGuzzleExtension.php index 5266374..ac65d7b 100644 --- a/src/DependencyInjection/EightPointsGuzzleExtension.php +++ b/src/DependencyInjection/EightPointsGuzzleExtension.php @@ -123,14 +123,14 @@ protected function createHandler(ContainerBuilder $container, string $name, arra $handler = new Definition(HandlerStack::class); $handler->setFactory([HandlerStack::class, 'create']); + $handler->addMethodCall('push', [$logExpression, 'log']); foreach ($this->plugins as $plugin) { $plugin->loadForClient($config['plugin'][$plugin->getPluginName()], $container, $name, $handler); } - $handler->addMethodCall('push', [$logExpression]); // goes on the end of the stack. - $handler->addMethodCall('unshift', [$eventExpression]); + $handler->addMethodCall('unshift', [$eventExpression, 'events']); return $handler; }