GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mapbox): upgrade Mapbox provider to Geocoding API v6 (2.0.0) by davidbarratt · Pull Request #1274 · geocoder-php/Geocoder

Conversation

@davidbarratt

@davidbarratt davidbarratt commented Aug 28, 2026

Copy link
Copy Markdown

Summary

  • Upgrades Geocoder\Provider\Mapbox\Mapbox in place to the Mapbox Geocoding API v6 (/search/geocode/v6/forward and /search/geocode/v6/reverse), as a major version (2.0.0) of geocoder-php/mapbox-provider
  • Adds v6 Structured Input (typed address fields via query data), autocomplete / proximity / worldview query data, a new 4th constructor argument bool $permanent, TYPE_STREET / TYPE_BLOCK / TYPE_SECONDARY_ADDRESS constants, and MapboxAddress::getMatchCode() / getMatchConfidence() / getAccuracy()
  • Removes the v5 endpoints, GEOCODING_MODE_*, TYPE_POI* and fuzzy_match; every breaking change is listed in the provider CHANGELOG 2.0.0 (v5 users: pin to geocoder-php/mapbox-provider:^1.5)

Closes #1237

Test Plan

  • composer test — full suite green (1049 tests); Mapbox: 45 tests incl. 7 v6 integration fixtures + 4 provider-integration fixtures replayed from .cached_responses with the placeholder key (CI-safe)
  • composer analyse — PHPStan level 6 clean
  • composer cs — clean on all touched files
  • TDD throughout: the failing-tests commit (test(mapbox): add failing tests for the v6 API) is followed by the implementation commits that turn the suite green
  • Fixtures recorded against the live v6 API (2026-08-28); all v5 fixtures removed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
davidbarratt added 12 commits August 28, 2026 16:52
@davidbarratt
docs: add design and implementation plan for Mapbox Geocoding v6
e67a4c1
@davidbarratt
feat(mapbox): add matchCode to MapboxAddress
7ec7d33
@davidbarratt
feat(mapbox): add matchConfidence to MapboxAddress
c723cdf
@davidbarratt
feat(mapbox): add accuracy to MapboxAddress
af2c3e3
@davidbarratt
test(mapbox): prepare test suite for the v6 API
b44c3ad
@davidbarratt
test(mapbox): add failing tests for the v6 API
a23ffaf
@davidbarratt
feat(mapbox): build requests for the Geocoding API v6
769d0b5
@davidbarratt
feat(mapbox): parse Geocoding API v6 responses
174081d
@davidbarratt
chore(mapbox): drop v5 fixtures; docs(mapbox): document v6 upgrade (2…
c4b3ff1
….0.0)
@davidbarratt
test(mapbox): record v6 fixtures for the provider integration test
86873e8
@davidbarratt
style(mapbox): order imports and annotate MapboxAddress in tests
00c8b4d
@davidbarratt
docs: remove Mapbox v6 plan and design docs
b42e9ca
@jbelien jbelien added the provider label Aug 29, 2026
@davidbarratt
CS Fixes
2c8ae27
@davidbarratt

davidbarratt commented Aug 29, 2026

Copy link
Copy Markdown
Author

@jbelien I've run the cs:fix script locally and committed the output, could you run the CI again? Did you have any other comments or feedback? Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jbelien jbelien added the need rebase label Sep 6, 2026
@jbelien

jbelien commented Sep 6, 2026

Copy link
Copy Markdown
Member

I'll try to have a look next week.

davidbarratt reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davidbarratt
Merge branch 'master' into mapbox-v6
1b1b0ab
@jbelien jbelien removed the need rebase label Sep 13, 2026
jbelien
jbelien requested changes Sep 13, 2026
View reviewed changes

@jbelien jbelien left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

I've made a first review and here are a few change requests:

  • Please do NOT remove or update any existing tests. Those tests must stay and still pass.
  • Simplify changes made in CHANGELOG.md. Look at the previous tags, no need to go such in small details.
  • Do not rename existing GEOCODE_ENDPOINT_URL_SSL and REVERSE_ENDPOINT_URL_SSL constants, there is no reason to, just change the URL to match the new v6 URLs (long story short: no need to rewrite the whole provider, focus on the changes related to v6 migration).

Thanks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@davidbarratt
Address review: keep existing tests and endpoint constant names
729fe9e
- Restore the pre-existing tests; only change them where v6 requires it
  (each change is annotated with the reason):
  * v6 has no poi/poi.landmark types: dropped from testGeocodePlaceWithLocale
  * v6 dataset differences: Princes Risborough for 'princ', 12 (not 8)
    Avenue Gambetta for the reverse test, v6 mapbox_id values
  * v6 treats '&' as the intersection search connector, so the
    '116th St & Broadway' query no longer matches any address; the test
    now uses '1600 Pennsylvania Avenue NW, Washington, DC 20500'
  * v6 removed the fuzzyMatch parameter: the two fuzzy tests are now
    autocomplete tests
- Keep the GEOCODE_ENDPOINT_URL_SSL and REVERSE_ENDPOINT_URL_SSL constant
  names; only the URL values move to the v6 endpoints. The provider keeps
  its previous structure, including the constructor signature (the
  mapbox.places-permanent mode maps to the v6 permanent parameter)
- Simplify the CHANGELOG entry to match the style of the previous tags
- Keep the v6 fixtures for both MapboxTest and the shared IntegrationTest
@davidbarratt

davidbarratt commented Sep 14, 2026

Copy link
Copy Markdown
Author

The changes should be minimal now. There are some backwards-incompatible changes with v6, so changing some of the existing tests was required, but it has been notated where that is the case.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jbelien jbelien jbelien requested changes

Requested changes must be addressed to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

provider

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Mapbox Geocoding v6

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@davidbarratt @jbelien
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.