Skip to content

Commit

Permalink
Replace HTTPlug factories by PSR-17 (#1184)
Browse files Browse the repository at this point in the history
* Replace HTTPlug factories by PSR-17

* minor fix

---------

Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
  • Loading branch information
nicolas-grekas and Nyholm authored Dec 15, 2023
1 parent b5e7d31 commit 40c46c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ composer require geocoder-php/yandex-provider
The API now requires an API key. [See here for more information](https://yandex.ru/blog/mapsapi/novye-pravila-dostupa-k-api-kart?from=tech_pp).

```php
$httpClient = new \GuzzleHttp\Client();
$httpClient = new \Http\Discovery\Psr18Client();
$provider = new \Geocoder\Provider\Yandex\Yandex($httpClient, null, '<your-api-key>);

$result = $geocoder->geocodeQuery(GeocodeQuery::create('ул.Ленина, 19, Минск 220030, Республика Беларусь'));
Expand Down
3 changes: 0 additions & 3 deletions Yandex.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ public function getName(): string
return 'yandex';
}

/**
* @param string $locale
*/
private function executeQuery(string $url, int $limit, string $locale = null): AddressCollection
{
if (null !== $locale) {
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"geocoder-php/provider-implementation": "1.0"
},
"require-dev": {
"geocoder-php/provider-integration-tests": "^1.0",
"php-http/curl-client": "^2.2",
"geocoder-php/provider-integration-tests": "^1.6.3",
"php-http/message": "^1.0",
"phpunit/phpunit": "^9.5"
},
Expand All @@ -44,4 +43,4 @@
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
}
}
}

0 comments on commit 40c46c2

Please sign in to comment.