Skip to content

feat(mapbox): upgrade Mapbox provider to Geocoding API v6 (2.0.0) - #1274

Open
davidbarratt wants to merge 13 commits into
geocoder-php:masterfrom
geosocio:mapbox-v6
Open

feat(mapbox): upgrade Mapbox provider to Geocoding API v6 (2.0.0) #1274
davidbarratt wants to merge 13 commits into
geocoder-php:masterfrom
geosocio:mapbox-v6

Conversation

@davidbarratt

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

@davidbarratt

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!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapbox Geocoding v6

2 participants