geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.95k stars 517 forks source link

No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation #894

Closed garak closed 5 years ago

garak commented 5 years ago

I'm getting such error when trying to instantiate GoogleMaps. It looks like there's no way to pass a MessageFactory to it, and sadly MessageFactoryDiscovery is failing here. I'm pretty sure that I'm doing something wrong and this is more a support request than a bug report.

Here is the super crazy part: if I install dev requirement, it works. If I don't (like in production), it fails.

thanks in advance

jbelien commented 5 years ago

Hello @garak ,

Did you install php-http/message as specified in the README file ?

You will need php-http/guzzle6-adapter and php-http/message on top of the Google Maps provider to make it work :

composer require geocoder-php/google-maps-provider php-http/guzzle6-adapter php-http/message
garak commented 5 years ago

Thanks for your reply. I already installed all required packages

garak commented 5 years ago

Opened an issue on https://github.com/php-http/discovery/issues/114

garak commented 5 years ago

As explained in mentioned issue, I solved by replacing Buzz with Guzzle. Thanks anyway.