geocoder-php / Geocoder

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

[Google Places] fix + support both reverse modes: Search & Nearby #1070

Closed wivaku closed 3 years ago

wivaku commented 4 years ago

Resolves https://github.com/geocoder-php/Geocoder/issues/1063

The reverse query was using Search (requires Type). This PR adds support for Nearby, which can be used with: rankby:prominence + radius (=default Nearby combination) rankby:distance + type/keyword/name (distance + type is very similar to the original Search)

Note: Search returns formatted_address, Nearby returns vicinity.

wivaku commented 4 years ago

@jbelien anything I need to do to resolve the reported branch conflict?

I did update the CHANGELOG.md. Originally I had picked v1.1.0 as the new version, but in parallel this was used for the PHP < 7.2 update as well. So I changed CHANGELOG.md and am using v1.2.0 now.

jbelien commented 4 years ago

@jbelien anything I need to do to resolve the reported branch conflict?

You shouldn't update the CHANGELOG.md file yourself, you need to merge/rebase the `master branch in your branch.

wivaku commented 4 years ago

I believe that's done, or am I doing that incorrectly (remember: apologies, this is my first pull request...)?

~/code/pull_requests/Geocoder/src/Provider/GoogleMapsPlaces - issue-1063
╰─ git merge master
Already up to date.
jbelien commented 4 years ago

You need to pull/download the changes made in the remote/origin repository (from GitHub). Could you try the following ?

git checkout master
git pull origin master
git checkout issue-1063
git merge master
wivaku commented 4 years ago

After git checkout master and git pull origin master CHANGELOG.md contains 1.0.1 and not 1.1.0 ( < PHP 7.2), so it seems it is not pulling the latest master. The listed commit is d6f45a4, which is the June 27 commit, so misses the 7 July 4 commits.

╰─ git checkout master

Switched to branch 'master'
Your branch is up to date with 'origin/master'.

╰─ git pull origin master

From github.com:wivaku/Geocoder
 * branch            master     -> FETCH_HEAD
Already up to date.

╰─ git rev-parse --short HEAD
d6f45a4

╰─ git checkout issue-1063

Switched to branch 'issue-1063'
Your branch is up to date with 'origin/issue-1063'.

╰─ git merge master

Already up to date.
jbelien commented 4 years ago

Oh sorry! I forgot you were in a fork of our repository. The origin is indeed your fork and not our repository.

Here are the commands:

git remote add upstream git://github.com/geocoder-php/Geocoder.git
git fetch upstream
git checkout master
git pull upstream master
git checkout issue-1063
git merge master
wivaku commented 4 years ago

that was it. Thanks for the very fast & useful responses!