Change record status: 
Project: 
Introduced in branch: 
9.3.x
Introduced in version: 
9.3.0
Description: 

GuzzleMiddlewarePass was responsible for collecting service IDs tagged as http_client_middleware and passing them to the http_handler_stack_configurator service.

TaggedHandlersPass does the same job in a generic way - it works for any service tag - so this pass is now used instead and GuzzleMiddlewarePass has been removed.

If you were using or extending GuzzleMiddlewarePass you should switch to TaggedHandlersPass instead.

Before

Custom service provider class:

class MyModuleServiceProvider implements ServiceProviderInterface {

  public function register(ContainerBuilder $container) {
    $container->addCompilerPass(new GuzzleMiddlewarePass());
  }

}

After

In my_module.services.yml:

  http_handler_stack_configurator:
    class: Drupal\Core\Http\HandlerStackConfigurator
    arguments: ['@service_container']
    tags:
      - { name: service_id_collector, tag: http_client_middleware }
Impacts: 
Module developers