-
Notifications
You must be signed in to change notification settings - Fork 13
Fix broken unit tests for Baidu (via PR #33) #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Baidu map API has updated to V2
…into dizzying-patch-1
Awesome work. Am I correct if I say that nothing has changed in the Baidu API from version 1 to 3 regarding geocoding and reverse geocoding? |
I see that this PR updates the version of Baidu API. $before = 'http://api.map.baidu.com/geocoder?output=json&key=%s&address=%s';
$after = 'http://api.map.baidu.com/geocoder/v2/?output=json&pois=0&ak=%s&address=%s'; What have changed on the Baido API server between those releases? Did the change effect the geocode or reverse geocode endpoints? |
@Nyholm Ah. I see what you mean now. The changes to the API endpoints were made in PR #33 and I manually merged that PR into my checked out repo before creating this PR. The only change on Baidu's end is the URL endpoint, from The main reason behind PR #48 (this PR), is that the original PR changed the provider's code, but did not change/fix up the unit tests (if indeed they were ever run). So this PR incorporates and obsoletes PR #33 as well as adding the fixes to get the unit tests to build cleanly again. So when we merge this PR, we'll need to close down #33 as well, but not merge #33. If that all makes sense? |
Yes, Everything makes perfect sense. It was this I was looking for:
|
Thank you for your work. |
Awesome. Thanks. |
As noted in #33 (comment), the pull request as submitted broke the unit tests. This PR incorporates the code changes to
BaiduProvider.php
as well as fixing up the unit tests as a result of the changed endpoint URLs for v2 of Baidu's geocoding API.