FOSHttpCache
FOSHttpCache copied to clipboard
Switch to Symfony HttpClient?
Would it make sense to switch to Symfony HttpClient to reduce setup time with the lib/bundle?
Technically library would only need to rely on symfony/http-client-contracts OR just PSR-18 as proposed in #443 if that covers all our needs. And furthermore rely on symfony/http-client as dev dependency, while bundle maybe relying and wiring that up by default.
i'd prefer to depend on PSR-18. the symfony http-client has been developped ignoring the efforts of PSR-18. if i remember correctly, there is a PSR-18 adapter that makes a symfony/http-client available as PSR-18 client.
There is, PSR-18 is the way to go here👌🏻
the symfony http-client has been developed ignoring the efforts of PSR-18
I guess they wanted to go beyond what's there, but indeed PSR-18 type hinting would be the way to go in the lib, but for the Bundle we could wire up Symfony HttpClient as the client (via adapter) for instance.
yep, if we can make the bundle run without further manual steps, that'd be nice. with symfony being split into components, i am not sure if typical installs will have all the necessary components, but thats something to experiment with. at least in the symfony pack, we can (and should) go for the symfony http client.
i marked this with the 3.0 milestone. guess at some point we need to kick off version 3 work.
update: if we go PSR-18, we can use httplug/discovery which since recently automatically installs a PSR-18 compatible client if none is specified by the application.
closing in favor of #443