Replace ServerRequestFactory with RequestFactory #321
Merged
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.
In #257 we introduced the new
Psr18Client, based on a PSR-18 client and PSR-17 factories.Some month ago I noticed that I required a
Psr\Http\Message\ServerRequestFactoryInterface, but we only need aPsr\Http\Message\RequestFactoryInterface. This shouldn't be a problem, because all PSR-18 clients are working withPsr\Http\Message\RequestInterfaceimplementations andServerRequestInterfaceis extending theRequestInterface.However this PR will fix this by allowing a
Psr\Http\Message\RequestFactoryInterfaceimplementation in thePsr18Client. Providing aPsr\Http\Message\ServerRequestFactoryInterfacewill also work but is deprecated and will trigger a deprecation warning. In the next major release we can remove the support forPsr\Http\Message\ServerRequestFactoryInterfacecompletely.