message-factory icon indicating copy to clipboard operation
message-factory copied to clipboard

Add PSR-17 compatibility layer

Open sagikazarmark opened this issue 7 years ago • 3 comments

This PR adds a compatibility layer between our message factories and PSR-17. Once it is in place, we can refactor the discovery layer to check for PSR-17 implementations and use them instead of requiring the php-http/message package.

After that we can deprecate the implementations of our message factories and the interfaces themselves, eventually migrating to PSR-17 interfaces. Maybe we can do it before tagging client-common 2.0?

Todo

  • [ ] Add tests (anyone up for it?)

sagikazarmark avatar Dec 06 '18 18:12 sagikazarmark

Hi, is the merge of this pull request planned?

silvadanilo avatar Mar 12 '19 14:03 silvadanilo

when this is released, update the changes from https://github.com/php-http/cache-plugin/pull/56

dbu avatar Dec 17 '19 13:12 dbu

Sorry, totally forgot about it. Will try to pick this up soon.

sagikazarmark avatar Dec 29 '19 11:12 sagikazarmark

Hi, is the merge of this pull request planned?

Infernal15 avatar Nov 02 '22 15:11 Infernal15

not sure how useful this is anymore, there are a bunch of factory implementations available. the most popular being guzzlehttp/psr7 and nyholm/psr7, see https://packagist.org/providers/psr/http-factory-implementation for the full list of implementations.

and php-http/discovery has support for the guzzlehttp and nyholm factories.

is there any need to provide a psr 17 implemenation on top of our own factories? /cc @Nyholm

dbu avatar Dec 04 '22 14:12 dbu