Skip to content

Commit 0064fb8

Browse files
committed
Testing upgrade of httplug and switch to PSR-18
1 parent 607cdfe commit 0064fb8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
},
3232
"require": {
3333
"php": ">=7.1",
34-
"php-http/client-implementation": "^1.0",
34+
"psr/http-client-implementation": "^1.0",
3535
"laminas/laminas-diactoros": "^1.8.4 || ^2.0",
3636
"lcobucci/jwt": "^3.2",
3737
"ocramius/package-versions": "^1.4",
3838
"psr/container": "^1.0"
3939
},
4040
"require-dev": {
4141
"phpunit/phpunit": "^7.4",
42-
"php-http/mock-client": "^0.3.0",
42+
"php-http/mock-client": "^1.4",
4343
"estahn/phpunit-json-assertions": "^3.0.0",
4444
"squizlabs/php_codesniffer": "^3.1",
45-
"php-http/guzzle6-adapter": "^1.0",
45+
"php-http/guzzle6-adapter": "^2.0",
4646
"phpstan/phpstan": "^0.12.11"
4747
},
4848
"autoload": {

src/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Nexmo\Client\Factory\FactoryInterface;
2727
use Nexmo\Client\Credentials\SignatureSecret;
2828
use Nexmo\Client\Credentials\CredentialsInterface;
29+
use Psr\Http\Client\ClientInterface;
2930

3031
/**
3132
* Nexmo API Client, allows access to the API from PHP.
@@ -75,7 +76,7 @@ class Client
7576
/**
7677
* Create a new API client using the provided credentials.
7778
*/
78-
public function __construct(CredentialsInterface $credentials, $options = array(), HttpClient $client = null)
79+
public function __construct(CredentialsInterface $credentials, $options = array(), ClientInterface $client = null)
7980
{
8081
if (is_null($client)) {
8182
$client = new \Http\Adapter\Guzzle6\Client();
@@ -170,7 +171,7 @@ public function getApiUrl()
170171
* @param HttpClient $client
171172
* @return $this
172173
*/
173-
public function setHttpClient(HttpClient $client)
174+
public function setHttpClient(ClientInterface $client)
174175
{
175176
$this->client = $client;
176177
return $this;

0 commit comments

Comments
 (0)