Skip to content

Upgrade v3 to current geocoder compatibility#243

Open
nathanbrauer wants to merge 2 commits into
3from
patch-3-geocoder
Open

Upgrade v3 to current geocoder compatibility#243
nathanbrauer wants to merge 2 commits into
3from
patch-3-geocoder

Conversation

@nathanbrauer
Copy link
Copy Markdown
Contributor

Just noticed you're working on this at the same time I am - starting a pull request.

FYI - due to several other packages requiring dynamic/silverstripe-geocoder:^1.0, you may need to run the following until it's safe to upgrade all the others (e.g. core-tools, silverstripe-elemental-customer-service, etc):

ddev composer require dynamic/silverstripe-geocoder:"2.0.4 as 1.3.1"

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 74.31%. Comparing base (a5d1c00) to head (a8114b2).

Files Patch % Lines
src/pages/LocatorController.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                  3     #243   +/-   ##
=========================================
  Coverage     74.31%   74.31%           
  Complexity      107      107           
=========================================
  Files             7        7           
  Lines           366      366           
=========================================
  Hits            272      272           
  Misses           94       94           
Flag Coverage Δ
unittests 74.31% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

$lat = $response->getLatitude();
$lng = $response->getLongitude();
$lat = $response->getCoordinates()->getLatitude();
$lng = $response->getCoordinates()->getLongitude();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Although, wouldn't it be more economical to do this instead?

            $coordinates = $geocoder->getResult()->getCoordinates();
            $lat = $coordinates->getLatitude();
            $lng = $coordinates->getLongitude();

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants