Skip to content

Commit e3947c2

Browse files
committed
fix(ZMS): type Http client as Psr7\Client to fix test failures
Psr7\Client is not a PSR-18 ClientInterface; the previous typing caused TypeError when the constructor defaulted to new Psr7\Client().
1 parent 7df96da commit e3947c2

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

zmsclient/src/Zmsclient/Http.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Psr\Http\Message\RequestInterface;
66
use Psr\Http\Message\UriInterface;
7-
use Psr\Http\Client\ClientInterface;
87
use Slim\Psr7\Headers;
98

109
/**
@@ -15,10 +14,7 @@
1514
*/
1615
class Http
1716
{
18-
/**
19-
* @var ClientInterface
20-
*/
21-
protected ClientInterface $client;
17+
protected Psr7\Client $client;
2218

2319
/**
2420
* @var string
@@ -63,11 +59,7 @@ class Http
6359
*/
6460
public static $jsonCompressLevel = null;
6561

66-
/**
67-
*
68-
* @param ClientInterface $client
69-
*/
70-
public function __construct($baseUrl, ?ClientInterface $client = null)
62+
public function __construct($baseUrl, ?Psr7\Client $client = null)
7163
{
7264
$this->http_baseurl = parse_url($baseUrl, PHP_URL_PATH) ?? '';
7365
$this->uri = new Psr7\Uri();

0 commit comments

Comments
 (0)