Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / DependencyInjection / Compiler / GuzzleMiddlewarePass.php
1 <?php
2
3 namespace Drupal\Core\DependencyInjection\Compiler;
4
5 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6 use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8 class GuzzleMiddlewarePass implements CompilerPassInterface {
9
10   /**
11    * {@inheritdoc}
12    */
13   public function process(ContainerBuilder $container) {
14     $middleware_ids = array_keys($container->findTaggedServiceIds('http_client_middleware'));
15     $container->getDefinition('http_handler_stack_configurator')
16       ->addArgument($middleware_ids);
17   }
18
19 }