symfony 5.2未识别的选项';http#u版本';在framework.http_客户端下

symfony 5.2未识别的选项';http#u版本';在framework.http_客户端下,symfony,Symfony,我正在尝试使用Symfony实现异步HTTP客户端,在中说,要为HTTP启用它,我需要在配置中添加HTTP\u版本:“2.0”选项,我做到了: framework: http_client: http_version: '2.0' scoped_clients: site: base_uri: '%env(URL)%' headers:

我正在尝试使用Symfony实现异步HTTP客户端,在中说,要为HTTP启用它,我需要在配置中添加
HTTP\u版本:“2.0”
选项,我做到了:

framework:
    http_client:
        http_version: '2.0'
        scoped_clients:
            site:
                base_uri: '%env(URL)%'
                headers:
                    x-access-token: '%env(ACCESS_TOKEN)%'

但它不工作,我在“framework.http\u client”下得到了错误
无法识别的选项“http\u version”。可用选项包括“默认选项”、“已启用”、“最大主机连接”、“模拟响应工厂”、“作用域客户端”


你知道怎么了吗??提前谢谢

看起来文档可能需要更新一点。在5.2应用程序下:

bin/console config:dump-reference framework http_client

# HTTP Client configuration
http_client:
    enabled:              true

    # The maximum number of connections to a single host.
    max_host_connections: ~
    default_options:

        # Associative array: header => value(s).
        headers:

            # Prototype
            name:                 ~

        # The maximum number of redirects to follow.
        max_redirects:        ~

        # The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.
        http_version:         ~
所以http_版本使用默认_选项

# config/packages/framework.yaml
framework:
    http_client:
        default_options:
            http_version: '2.0'

bin/console debug:config framework http_client

Current configuration for "framework.http_client"
=================================================

default_options:
    http_version: '2.0'
    headers: {  }
    resolve: {  }
    retry_failed:
        enabled: false
        retry_strategy: null
        http_codes: {  }
        max_retries: 3
        delay: 1000
        multiplier: 2
        max_delay: 0
        jitter: 0.1
enabled: true
scoped_clients: {  }