File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 15
15
use Http \Client \HttpClient ;
16
16
use Http \Discovery \HttpClientDiscovery ;
17
17
use Http \Discovery \MessageFactoryDiscovery ;
18
+ use Http \Discovery \StreamFactoryDiscovery ;
18
19
use Http \Discovery \UriFactoryDiscovery ;
19
20
use Http \Message \MessageFactory ;
21
+ use Http \Message \SteamFactory ;
20
22
use Psr \Cache \CacheItemPoolInterface ;
21
23
22
24
/**
@@ -110,6 +112,11 @@ class Client
110
112
*/
111
113
private $ messageFactory ;
112
114
115
+ /**
116
+ * @var StreamFactory
117
+ */
118
+ private $ streamFactory ;
119
+
113
120
/**
114
121
* @var Plugin[]
115
122
*/
@@ -141,6 +148,7 @@ public function __construct(HttpClient $httpClient = null)
141
148
{
142
149
$ this ->httpClient = $ httpClient ?: HttpClientDiscovery::find ();
143
150
$ this ->messageFactory = MessageFactoryDiscovery::find ();
151
+ $ this ->streamFactory = StreamFactoryDiscovery::find ();
144
152
145
153
$ this ->responseHistory = new History ();
146
154
$ this ->addPlugin (new GithubExceptionThrower ());
@@ -382,7 +390,7 @@ public function addHeaders(array $headers)
382
390
public function addCache (CacheItemPoolInterface $ cachePool )
383
391
{
384
392
$ this ->removeCache ();
385
- $ this ->addPlugin (new Plugin \CachePlugin ($ cachePool ));
393
+ $ this ->addPlugin (new Plugin \CachePlugin ($ cachePool, $ this -> streamFactory ));
386
394
}
387
395
388
396
/**
You can’t perform that action at this time.
0 commit comments