Skip to content

Commit

Permalink
Merge pull request #143 from Neirda24/master
Browse files Browse the repository at this point in the history
[FIX] Add names to middlewares
  • Loading branch information
Florian Preusner authored Nov 2, 2017
2 parents 03927ad + 9311ae1 commit f9e7383
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DependencyInjection/EightPointsGuzzleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f9e7383

Please sign in to comment.