FOSHttpCache icon indicating copy to clipboard operation
FOSHttpCache copied to clipboard

`php-http/message-factory` is abandoned

Open mvhirsch opened this issue 1 year ago • 3 comments

Hey :-)

One of my projects is using friendsofsyfmony/fos-http-cache-bundle. I recently noticed composers output:

Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.

Obviously this got abandoned: https://packagist.org/packages/php-http/message-factory

What should be the next step? I'm new to HTTPlug and PSR17, but I'm eager to learn.

mvhirsch avatar Feb 01 '24 08:02 mvhirsch

indeed we should switch to PSR-17 (and PSR-18 with php-http/discovery for autoconfiguration if desired).

as we have the not yet released 3.x branch, this is the perfect moment for changes that potentially incur BC breaks. if you are motivated, its awesome if you can attempt the switch.

in a first step, that would be to remove the php-http/message-factory and require psr/http-factory, then change to use the PSR-17 RequestFactoryInterface (and maybe we need UriFactoryInterface too) instead of the current request factory.

for the discovery part, it means replacing MessageFactoryDiscovery with Psr17FactoryDiscovery (in HttpProxyClient and if there are other places, those too).

i suggest doing only that part in a first step, and only start looking into PSR-18 once we have wrapped up above and have been able to merge it.

dbu avatar Feb 01 '24 13:02 dbu

Thank you for your answer. Sounds simple and easy to me.

I'll provide a PR next week (this week are holidays in Austria) :+1:

mvhirsch avatar Feb 05 '24 20:02 mvhirsch

Hello,

So the pr for the cache bundle is on waiting now ?

toxicity1985 avatar Feb 13 '24 15:02 toxicity1985

fixed in #566

dbu avatar Mar 28 '24 08:03 dbu

Thank you @dbu !

mvhirsch avatar Apr 01 '24 06:04 mvhirsch