Skip to content

HttpClient uses Amp even if it's incompatible (with fibers) #48143

Closed
@Bilge

Description

@Bilge

Symfony version(s) affected

5.4.15

Description

The HttpClient implementation only cares if ConnectionLimitingPool is defined:

if ($amp = class_exists(ConnectionLimitingPool::class)) {

However, this tells nothing of whether this is a version of Amp using coroutines (v1-4) or fibers (v5+). Both versions declare ConnectionLimitingPool, so this doesn't distinguish between versions and if the user has installed Amp HTTP client v5, it will fail.

How to reproduce

Try to send a request using HttpClient with amphp/http-client:^5@beta installed.

Possible Solution

Either directly support Amp HTTP client v5 or find a better detection method that rejects such version.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions