Skip to content

Move to a v2-compatible HTTP implementation #64

Description

@Crell

This library currently depends on ringcentral/psr7. However, that appears to be abandoned, and only supports PSR-7 v1. Just about everything else has moved to PSR-7 v2, which adds types.

This causes a problem when this package is a transitive dependency, as it means an application using it must use psr/http-message v1, not v2. But some libraries now require v2, making them mutually incompatible.

This is causing issues upstream. See:

reactphp/http#545
reactphp/http#542

Changing the dependency to the more widely used nyholm/psr7 (which supports v2) would resolve this chain of dependencies, and allow React HTTP to be used alongside PSR-7 v2.

Activity

WyriHaximus commented on Jun 10, 2025

@WyriHaximus

Changing the dependency to the more widely used nyholm/psr7 (which supports v2) would resolve this chain of dependencies, and allow React HTTP to be used alongside PSR-7 v2.

That sadly won't solve it, purely because of this function call. Had a look at this recently but haven't found a solution for it yet: https://github.com/clue/reactphp-http-proxy/blob/1.x/src/ProxyConnector.php#L187

kwhat commented on Jun 11, 2025

@kwhat
Contributor

@WyriHaximus I am not sure if I butchered this, but it seems like the only part of the RingCentral/PSR7 library that is being used is just to grab the response code and reason from the HTTP reposes first line. All the other header processing is done, but subsequently ignored. There doesn't appear to be any validation or error checking provided either, so I just added a simple regex match to replace the functionality.

WyriHaximus commented on Jun 11, 2025

@WyriHaximus

@kwhat Correct, didn't even look that far, was also checking possible libraries and seeing if they provide that functionality. Funny enough, we have exactly this in react/http where this quest initially started 🤣

WyriHaximus commented on Jun 23, 2025

@WyriHaximus

@Crell FYI IMHO this looks like a good fix: #65

added this to the v1.10.0 milestone on Jun 29, 2026

clue commented on Jun 29, 2026

@clue
Owner

Closed via #65 :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions