Skip to content

Conversation

@Simperfit
Copy link
Contributor

fix #562

@Simperfit
Copy link
Contributor Author

@Nyholm test pass locally with php 5.6, do I have to do something about the coordinates ?

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Great PR. Just remove some comments and fix that test.

/**
* @param HttpClient $client An HTTP adapter
* @param string $sourceCountry Country biasing (optional)
* @param bool $useSsl Whether to use an SSL connection (optional)
Copy link
Member

Choose a reason for hiding this comment

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

This comment should be removed

* @param HttpClient $client An HTTP adapter.
* @param string $apiKey An API key.
* @param string $service The specific Maxmind service to use (optional).
* @param bool $useSsl Whether to use an SSL connection (optional).
Copy link
Member

Choose a reason for hiding this comment

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

This comment should be removed.

{
$provider = new GoogleMaps($this->getAdapter());
$results = $provider->geocode('Paris');
$results = $provider->geocode('i');
Copy link
Member

Choose a reason for hiding this comment

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

This line should not be changed. Keep "Paris" here and we do not have to modify the rest of the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I let Paris, the test does not pass anymore because of https://maps.googleapis.com/maps/api/geocode/json?address=Paris%22 returning just one element

Copy link
Member

Choose a reason for hiding this comment

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

That is very strange... But the issue is at the geocoder service. Let's do as you do an remove 'Paris'.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, you get new caches.. Please rename the file "tests/.cached_responses/0e41628de6d90aa50c426e12391617abc3ccf5ff" to "tests/.cached_responses/65760b8fc8d216f997a2e5b2ce499881426f7353".

Now it will work with "Paris"

@Nyholm
Copy link
Member

Nyholm commented Dec 23, 2016

test pass locally with php 5.6, do I have to do something about the coordinates ?

No, you should not change any of the coordinates or addresses. I think you accidentally modified the geocode string. I wrote an inline comment about that.

@Nyholm Nyholm added this to the 4.0.0 milestone Dec 23, 2016
@Simperfit Simperfit force-pushed the feature/remove-non-ssl branch from ab67066 to 3fd7fe2 Compare December 23, 2016 14:47
@Simperfit
Copy link
Contributor Author

I think the ApiResult of Arcgis are inconsistent, since it does not break on the same things everytime

@Nyholm
Copy link
Member

Nyholm commented Dec 23, 2016

True. Run your tests locally. Make sure that you have the following in your phpunit.xml

<server name="USE_CACHED_RESPONSES" value="true" />

If the test passes, make sure to checkin the new cached response that will be created in tests/.cached_responses

@Nyholm
Copy link
Member

Nyholm commented Dec 23, 2016

From #567 (comment)

Ah, you get new caches.. Please rename the file "tests/.cached_responses/0e41628de6d90aa50c426e12391617abc3ccf5ff" to "tests/.cached_responses/65760b8fc8d216f997a2e5b2ce499881426f7353".

Now it will work with "Paris"

@Simperfit
Copy link
Contributor Author

@Nyholm done ;)

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Looks great. Had a small question. Doing a final review tomorrow. (Guest just arrived)

$this->assertInstanceOf('\Geocoder\Model\Address', $result);
$this->assertEquals(33.6609389, $result->getCoordinates()->getLatitude(), '', 0.001);
$this->assertEquals(-95.555513, $result->getCoordinates()->getLongitude(), '', 0.001);
$this->assertEquals(33.660938899999998, $result->getCoordinates()->getLatitude(), '', 0.001);
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to change these coordinates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I don't need too ;)

@Nyholm Nyholm merged commit a557261 into geocoder-php:master Dec 23, 2016
@Nyholm
Copy link
Member

Nyholm commented Dec 23, 2016

Thank you @Simperfit. Great work!

@Simperfit Simperfit deleted the feature/remove-non-ssl branch December 26, 2016 07:51
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.

Remove non-ssl support

2 participants