feat: #3620309 Support Mapbox Geocoding API v6 (geocoder-php/mapbox-provider 2.0.0)

The Mapbox plugin now targets the Mapbox Geocoding API v6, as provided by geocoder-php/mapbox-provider 2.0.0:

  • The annotation argument geocodingMode (string) is replaced by permanent (boolean, default FALSE), matching the v6 constructor __construct(ClientInterface, string $accessToken, ?string $country = NULL, bool $permanent = FALSE).
  • The fuzzy_match option (removed in v6) is replaced by the v6 autocomplete option (same default FALSE behavior).
  • An empty country is normalized to NULL, as the v6 provider only omits the country request parameter for NULL (an empty string would be sent as country= in every request).
  • Config schema: geocodingMode and fuzzy_match removed, permanent and autocomplete added.
  • A post update function migrates existing Mapbox provider configurations (geocodingMode mapbox.places-permanent becomes permanent: true).
  • composer.json: require-dev mapbox-provider ^2.0 and a conflict on <2.0.
  • Unit and kernel tests for the new constructor arguments, the v6 request parameters, the configuration form and the migration.

By: davidwbarratt

Closes #3620309

Merge request reports

Loading