Remove ringcentral/psr7 because it appears to be abandoned and upstream projects would like to support psr/http-message ^2.0#65
Conversation
d5a3986 to
c8c42e8
Compare
|
Hey @clue, @WyriHaximus, could you take a look at this? I think this might be a solid direction/solution |
|
@CodeWithKyrian @kwhat This looks great to me as it doesn't introduce another dependency and it helps move reactphp/http#542 forward. But I don't have any power or say over this repo, so this is all in @clue's hands. |
|
I understand. We wait then |
|
@clue Bump! |
|
@clue bump? |
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
This changeset introduces our PSR-7 v2 implementation alongside our PSR-7 v1 implementation and goes with v1 or v2 depending on which `psr/http-message` version is installed. This is admittedly not my best code, nor am I proud of it, but it gets the job done. This relies on clue/reactphp-http-proxy#65 being merged first. Implements reactphp#513 for `react/http` v1.
898413b to
cef6368
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the ringcentral/psr7 dependency by replacing PSR-7 response parsing with lightweight parsing of the HTTP status line returned from an HTTP CONNECT proxy, avoiding PSR-7 v1 constraints for downstream consumers.
Changes:
- Remove
ringcentral/psr7from Composer requirements. - Replace proxy response parsing in
ProxyConnectorwith a regex-based status-line parse and status-code handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ProxyConnector.php | Removes PSR-7 parsing and manually extracts status code/reason phrase from the proxy’s HTTP response. |
| composer.json | Drops the ringcentral/psr7 dependency from require. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cef6368 to
4f27f79
Compare
4f27f79 to
a36668d
Compare
…am projects would like to support psr/http-message ^2.0
a36668d to
bb64fe0
Compare
It is unclear if we need to wait for all of the headers before parsing or if by removing the PSR7 requirement we can simply just parse the first line of the http response. I left the
strpos()in there in case there was a reason the code was waiting.This resolves issue #64