php-http/guzzle5-adapter

Remove hard dependency on Discovery

Closed this issue · 1 comments

Following our discussion on slack:

Discovery package should be remove from require and be in the suggest section.
Adapter can still have null as the MessageFactory and use the discovery to guess it.

However if the Discovery class is not present and there is no message factory provided it should throw a LogicException with the following message :

No message factory provided and no discovery service is present to guess it, maybe you need to install php-http/discovery package ?

We should add this message into the documentation FAQ.

(Maybe we can also provide the link to this FAQ in the exception message ?)

Not sure about the link. Could work with a quicklink, like php-http.org/faq123