geocoder-php / Geocoder

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

Google Maps: Keyless access to Google Maps Platform is deprecated. #923

Closed jbelien closed 5 years ago

jbelien commented 5 years ago

You must have a valid API key and a billing account to access our APIs. When you enable billing, you will get $200 free usage every month for Maps, Routes, or Places. Based on the millions of users using our APIs today, most of them can continue to use Google Maps Platform for free with this credit. Having a billing account helps us understand our developers’ needs better and allows you to scale seamlessly. https://cloud.google.com/maps-platform/user-guide/account-changes/

Since 11 June 2018, we can't query the Google Maps Geocoding API without a key.

That means that tests that are not cached will fail with the following "error".

{
   "error_message" : "Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account",
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}

I noticed this while working on reviewing PR #918 ; I noticed that Travis was failing and (at first) didn't understood why.

I think it's worth updating the tests by adding API key every time (I'll submit a PR in a few minutes) and update the cached responses (but I don't have a Google Maps API key so I can't do it).

@Nyholm @willdurand (or even @Tiraniel) : would you have a Google Maps API key I could use to update the tests (or you could even do it yourself) ? Thanks.