Skip to content

Commit ec04b69

Browse files
authored
Expect a PSR-18 client instead of a PHP-HTTP client (#1110)
* Expect a PSR-18 client instead of a PHP-HTTP client * Update integration tests
1 parent b095ab1 commit ec04b69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

IP2Location.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Geocoder\Query\ReverseQuery;
2222
use Geocoder\Http\Provider\AbstractHttpProvider;
2323
use Geocoder\Provider\Provider;
24-
use Http\Client\HttpClient;
24+
use Psr\Http\Client\ClientInterface;
2525

2626
/**
2727
* @author William Durand <[email protected]>
@@ -44,10 +44,10 @@ final class IP2Location extends AbstractHttpProvider implements Provider
4444
private $endpointUrl;
4545

4646
/**
47-
* @param HttpClient $client a HTTP adapter
48-
* @param string $apiKey an API key
47+
* @param ClientInterface $client a HTTP adapter
48+
* @param string $apiKey an API key
4949
*/
50-
public function __construct(HttpClient $client, string $apiKey)
50+
public function __construct(ClientInterface $client, string $apiKey)
5151
{
5252
parent::__construct($client);
5353

Tests/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use Geocoder\IntegrationTest\ProviderIntegrationTest;
1414
use Geocoder\Provider\IP2Location\IP2Location;
15-
use Http\Client\HttpClient;
15+
use Psr\Http\Client\ClientInterface;
1616

1717
/**
1818
* @author IP2Location <[email protected]>
@@ -23,7 +23,7 @@ class IntegrationTest extends ProviderIntegrationTest
2323

2424
protected $testReverse = false;
2525

26-
protected function createProvider(HttpClient $httpClient)
26+
protected function createProvider(ClientInterface $httpClient)
2727
{
2828
return new IP2Location($httpClient, $this->getApiKey());
2929
}

0 commit comments

Comments
 (0)