TASK: Deprecate Browser RequestEngines
In discussion about #2688 with @mficzel we found that the RequestEngineInterface is effectively a PSR ClientInterface, so the Browser, which itself implements the ClientInterface depends on another PSR Http client to do it's job. It is effectively just a slim wrapper with convenience methods.
Replacing RequestEngineInterface with ClientInterface would be breaking though and moreover require special objects.yaml configuration for the Browser to not inject itself (as it is the default implementation for ClientInterface as of #2688).
So the long-term goal with Browser is this:
- make our tests not depend on
Browser->request(), which depends on the RequestEngine to be the very specific InternalRequestEngine. Instead make tests directly use the InternalRequestEngine or wrap it in a separate class for this specific concern - get rid of the RequestEngineInterface alltogether and make Browser either directly implement the CurlEngine methods or use it
The idea is that Browser is our convenience implementation of a PSR HttpClient and if you need to send requests you can use it or any other PSR client, but there's no exchangable internal implementation any more.