@@ -50,13 +50,13 @@ Read more about HTTPlug in [their docs](http://docs.php-http.org/en/latest/httpl
5050
5151### Summary (Just give me the command)
5252
53- To install Google Maps geocoder with Guzzle 6 you may run the following command:
53+ To install Google Maps geocoder with Guzzle 7 you may run the following command:
5454
5555``` cmd
56- composer require geocoder-php/google-maps-provider php-http/guzzle6-adapter
56+ composer require geocoder-php/google-maps-provider guzzlehttp/guzzle
5757```
5858
59- Or using the curl client (you'll need to provide a PSR7 implementation such as ` nyholm/psr7 ` if not using guzzle )
59+ Or using the curl client (you'll need to provide a PSR7 implementation such as ` nyholm/psr7 ` if not using Guzzle )
6060
6161``` cmd
6262composer require geocoder-php/google-maps-provider php-http/curl-client nyholm/psr7
@@ -81,13 +81,13 @@ We have a small cookbook where you can find examples on common use cases:
8181
8282## Usage
8383
84- In the code snippet below we use GoogleMaps and Guzzle6 .
84+ In the code snippet below we use GoogleMaps and Guzzle 7 .
8585
8686``` php
8787use Geocoder\Query\GeocodeQuery;
8888use Geocoder\Query\ReverseQuery;
8989
90- $httpClient = new \Http\Adapter\Guzzle6 \Client();
90+ $httpClient = new \GuzzleHttp \Client();
9191$provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, 'your-api-key');
9292$geocoder = new \Geocoder\StatefulGeocoder($provider, 'en');
9393
@@ -203,13 +203,13 @@ when a provider returns a result. The result is returned by `GoogleMaps` because
203203use Geocoder\Query\GeocodeQuery;
204204
205205$geocoder = new \Geocoder\ProviderAggregator();
206- $adapter = new \Http\Adapter\Guzzle6 \Client();
206+ $client = new \GuzzleHttp \Client();
207207
208208$chain = new \Geocoder\Provider\Chain\Chain([
209- new \Geocoder\Provider\FreeGeoIp\FreeGeoIp($adapter ),
210- new \Geocoder\Provider\HostIp\HostIp($adapter ),
211- new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter , 'France'),
212- new \Geocoder\Provider\BingMaps\BingMaps($adapter , '<API _KEY >'),
209+ new \Geocoder\Provider\FreeGeoIp\FreeGeoIp($client ),
210+ new \Geocoder\Provider\HostIp\HostIp($client ),
211+ new \Geocoder\Provider\GoogleMaps\GoogleMaps($client , 'France'),
212+ new \Geocoder\Provider\BingMaps\BingMaps($client , '<API _KEY >'),
213213 // ...
214214]);
215215
@@ -230,15 +230,15 @@ decide which provider to use later on.
230230use Geocoder\Query\GeocodeQuery;
231231use Geocoder\Query\ReverseQuery;
232232
233- $adapter = new \Http\Adapter\Guzzle6 \Client();
233+ $client = new \GuzzleHttp \Client();
234234$geocoder = new \Geocoder\ProviderAggregator();
235235
236236$geocoder->registerProviders([
237- new \Geocoder\Provider\GoogleMaps\GoogleMaps($adapter ),
238- new \Geocoder\Provider\GoogleMaps\GoogleMapsBusiness($adapter , '<CLIENT _ID >'),
239- new \Geocoder\Provider\Yandex\Yandex($adapter ),
240- new \Geocoder\Provider\MaxMind\MaxMind($adapter , '<MAXMIND _API_KEY >'),
241- new \Geocoder\Provider\ArcGISOnline\ArcGISOnline($adapter ),
237+ new \Geocoder\Provider\GoogleMaps\GoogleMaps($client ),
238+ new \Geocoder\Provider\GoogleMaps\GoogleMapsBusiness($client , '<CLIENT _ID >'),
239+ new \Geocoder\Provider\Yandex\Yandex($client ),
240+ new \Geocoder\Provider\MaxMind\MaxMind($client , '<MAXMIND _API_KEY >'),
241+ new \Geocoder\Provider\ArcGISOnline\ArcGISOnline($client ),
242242]);
243243
244244$geocoder->registerProvider(new \Geocoder\Provider\Nominatim\Nominatim($adapter, 'https://your.nominatim.server'));
0 commit comments