Skip to content

[3.x] Support PSR-7 v2 alongside v1 - #554

Merged
WyriHaximus merged 2 commits into
reactphp:3.xfrom
clue-labs:3.x-psr-7-v2
Nov 8, 2026
Merged

WyriHaximus merged 2 commits into
reactphp:3.xfrom
clue-labs:3.x-psr-7-v2

Conversation

@clue

@clue clue commented Nov 8, 2026

Copy link
Copy Markdown
Member

This changeset ports #549 to react/http v3 to support PSR-7 v2 alongside v1. The first commit applies @WyriHaximus' original implementation as is, and the second commit applies my follow-up but turns it around for v3, which requires PHP 7.1+ since #530: the main classes now use all native types declared by psr/http-message v2 and v1.1, and only fall back to legacy *.v1.php classes without native parameter types for psr/http-message v1.0. This also includes the missing ?string parameter type for getMetadata() as fixed for v1 in #553.

All tests pass with v1.0 on PHP 7.1 and v2 on PHP 7.2+ in CI as well as with v1.1 and v1.0 on PHP 8.4 and 8.5 locally, so this should be safe to apply.

Builds on top of #549, #530 and clue/reactphp-http-proxy#65
Implements #513 for react/http v3
Refs #553

@clue clue added this to the v3.0.0 milestone Nov 8, 2026
@clue
clue requested a review from WyriHaximus November 8, 2026 14:18

@WyriHaximus WyriHaximus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@WyriHaximus
WyriHaximus merged commit a58e432 into reactphp:3.x Nov 8, 2026
10 checks passed
@clue
clue deleted the 3.x-psr-7-v2 branch November 8, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants