Skip to content

Commit a6bb789

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 13c3177 commit a6bb789

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

GraphHopper.php

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

2727
/**
2828
* @author Gary Gale <[email protected]>
@@ -45,10 +45,10 @@ final class GraphHopper extends AbstractHttpProvider implements Provider
4545
private $apiKey;
4646

4747
/**
48-
* @param HttpClient $client an HTTP adapter
49-
* @param string $apiKey an API key
48+
* @param ClientInterface $client an HTTP adapter
49+
* @param string $apiKey an API key
5050
*/
51-
public function __construct(HttpClient $client, string $apiKey)
51+
public function __construct(ClientInterface $client, string $apiKey)
5252
{
5353
if (empty($apiKey)) {
5454
throw new InvalidCredentials('No API key provided.');

Tests/IntegrationTest.php

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

1515
use Geocoder\IntegrationTest\ProviderIntegrationTest;
1616
use Geocoder\Provider\GraphHopper\GraphHopper;
17-
use Http\Client\HttpClient;
17+
use Psr\Http\Client\ClientInterface;
1818

1919
/**
2020
* @author Tobias Nyholm <[email protected]>
@@ -30,7 +30,7 @@ class IntegrationTest extends ProviderIntegrationTest
3030

3131
protected $testIpv6 = false;
3232

33-
protected function createProvider(HttpClient $httpClient)
33+
protected function createProvider(ClientInterface $httpClient)
3434
{
3535
return new GraphHopper($httpClient, $this->getApiKey());
3636
}

0 commit comments

Comments
 (0)