Add HERE Geocoding & Search API (v8) support with v7 compatibility#1265
Open
Giacomo92 wants to merge 7 commits intogeocoder-php:masterfrom
Open
Add HERE Geocoding & Search API (v8) support with v7 compatibility#1265Giacomo92 wants to merge 7 commits intogeocoder-php:masterfrom
Giacomo92 wants to merge 7 commits intogeocoder-php:masterfrom
Conversation
…lity Add support for HERE Geocoding and Search API (v8), making it the new default while preserving full backward compatibility with the legacy Geocoder REST API (v7, retired December 31, 2023). - createUsingApiKey() now creates a v8 provider; use createV7UsingApiKey() for the deprecated v7 API - Constructor new Here(client, appId, appCode) still creates a v7 provider - Version-branching in geocodeQuery/reverseQuery/executeQuery keeps v7 and v8 code paths cleanly separated - parseV8Response() maps the v8 items[] structure to HereAddress - parseV7Response() extracted from the old inline loop (no logic change) - v7 endpoint constants and helpers preserved with @deprecated tags - HereAddress: typed nullable properties and null guards (null safety)
…n selection - HereTest.php: replace createUsingApiKey() with createV7UsingApiKey() in all v7 real-API tests and getProvider() helper, since createUsingApiKey() now creates a v8 provider by default - HereTest.php: add testDefaultVersionIsV8(), testV7ExplicitSelectionViaConstructor(), and testCreateV7UsingApiKeyFactory() to verify API version routing - HereV8Test.php: new test class covering v8 geocode/reverse mapping, invalid credentials, no-results, IP address rejection, query param pass-through, and all HereAddress field assertions
- IntegrationTest.php: rename createProvider() to use createV7UsingApiKey() so existing v7 cached response tests continue to work unchanged - Add createV8Provider() factory and four new v8 integration tests: testGeocodeQueryV8, testGeocodeQueryWithNoResultsV8, testReverseQueryV8, testReverseQueryWithNoResultsV8 - Rename CIT tests to testGeocodeQueryCITv7 / testReverseQueryCITv7 to clarify they test the v7-only CIT environment - getApiKey() now falls back to 'missing' (was unguarded array access) - Add four v8 cached response fixtures (PHP-serialized HERE GS7 API JSON)
Rewrite Readme.md with dual-version documentation: - Comparison table of v7 (legacy, retired Dec 31 2023) vs v8 (recommended) - v8 usage with createUsingApiKey() as the primary example - v8 query parameter reference (at, in, types, qq-mapped fields) - v8 response field reference (locationId, locationType, additionalData) - v7 usage examples marked @deprecated with migration warnings - Step-by-step migration guide from v7 to v8 - Links to HERE migration guide and retirement announcement
Rewrite Readme.md with dual-version documentation: - Comparison table of v7 (legacy, retired Dec 31 2023) vs v8 (recommended) - v8 usage with createUsingApiKey() as the primary example - v8 query parameter reference (at, in, types, qq-mapped fields) - v8 response field reference (locationId, locationType, additionalData) - v7 usage examples marked @deprecated with migration warnings - Step-by-step migration guide from v7 to v8 - Links to HERE migration guide and retirement announcement
…Geocoder into upgrade/here-maps-api-v8 # Conflicts: # src/Provider/Here/Readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The HERE Geocoder REST API (v7, path
/6.2/) was deprecated December 31, 2023 and shut down inJuly 2025. This PR adds support for the replacement HERE Geocoding & Search API while preserving backward compatibility with the legacy API during the transition period.
Note on version naming: HERE confusingly named their new API "Geocoding & Search API v7"
(GS7). To avoid collision with the legacy
/6.2/API, this provider uses the shorthand "v8"for the new API and "v7" for the legacy one.