@@ -50,13 +50,13 @@ Read more about HTTPlug in [their docs](http://docs.php-http.org/en/latest/httpl
50
50
51
51
### Summary (Just give me the command)
52
52
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:
54
54
55
55
``` cmd
56
- composer require geocoder-php/google-maps-provider php-http/guzzle6-adapter
56
+ composer require geocoder-php/google-maps-provider guzzlehttp/guzzle
57
57
```
58
58
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 )
60
60
61
61
``` cmd
62
62
composer 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:
81
81
82
82
## Usage
83
83
84
- In the code snippet below we use GoogleMaps and Guzzle6 .
84
+ In the code snippet below we use GoogleMaps and Guzzle 7 .
85
85
86
86
``` php
87
87
use Geocoder\Query\GeocodeQuery;
88
88
use Geocoder\Query\ReverseQuery;
89
89
90
- $httpClient = new \Http\Adapter\Guzzle6 \Client();
90
+ $httpClient = new \GuzzleHttp \Client();
91
91
$provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, 'your-api-key');
92
92
$geocoder = new \Geocoder\StatefulGeocoder($provider, 'en');
93
93
@@ -203,13 +203,13 @@ when a provider returns a result. The result is returned by `GoogleMaps` because
203
203
use Geocoder\Query\GeocodeQuery;
204
204
205
205
$geocoder = new \Geocoder\ProviderAggregator();
206
- $adapter = new \Http\Adapter\Guzzle6 \Client();
206
+ $client = new \GuzzleHttp \Client();
207
207
208
208
$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 >'),
213
213
// ...
214
214
]);
215
215
@@ -230,15 +230,15 @@ decide which provider to use later on.
230
230
use Geocoder\Query\GeocodeQuery;
231
231
use Geocoder\Query\ReverseQuery;
232
232
233
- $adapter = new \Http\Adapter\Guzzle6 \Client();
233
+ $client = new \GuzzleHttp \Client();
234
234
$geocoder = new \Geocoder\ProviderAggregator();
235
235
236
236
$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 ),
242
242
]);
243
243
244
244
$geocoder->registerProvider(new \Geocoder\Provider\Nominatim\Nominatim($adapter, 'https://your.nominatim.server'));
0 commit comments