Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade v3 to current geocoder compatibility #243

Open
wants to merge 2 commits into
base: 3
Choose a base branch
from

Conversation

nathanbrauer
Copy link
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"

Copy link

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
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.

2 participants