-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.4.7
Description
I tried to configure Guzzle with middlewares completly in yaml.
I tried to push a middleware into a handler stack. The method requires a parameter with the type callable
and gets a Closure
. It works fine but when i run lint:container
, I get: argument 1 of "GuzzleHttp\HandlerStack::push" accepts "callable", "Closure" passed.
It still works, but the linter complains.
How to reproduce
aws.http_client_handler_stack:
class: GuzzleHttp\HandlerStack
factory: [GuzzleHttp\HandlerStack, create]
calls:
- [push, ['@aws.http_logger']]
aws.http_logger:
class: Closure
factory: [GuzzleHttp\Middleware, log]
arguments:
- '@logger'
- '@aws.log_formatter'
tags:
- {name: monolog.logger, channel: aws}
aws.log_formatter:
class: GuzzleHttp\MessageFormatter
arguments:
- '{method} {uri} HTTP/{version} {code}'
Possible Solution
The linter should check types similar to the option resolver probably needs to know of the callable
type.