Repository navigation
[3.x] Support PSR-7 v2 alongside v1 - #554
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changeset ports #549 to
react/httpv3 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 bypsr/http-messagev2 and v1.1, and only fall back to legacy*.v1.phpclasses without native parameter types forpsr/http-messagev1.0. This also includes the missing?stringparameter type forgetMetadata()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/httpv3Refs #553