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 1515use Http \Client \HttpClient ;
1616use Http \Discovery \HttpClientDiscovery ;
1717use Http \Discovery \MessageFactoryDiscovery ;
18+ use Http \Discovery \StreamFactoryDiscovery ;
1819use Http \Discovery \UriFactoryDiscovery ;
1920use Http \Message \MessageFactory ;
21+ use Http \Message \SteamFactory ;
2022use Psr \Cache \CacheItemPoolInterface ;
2123
2224/**
@@ -110,6 +112,11 @@ class Client
110112 */
111113 private $ messageFactory ;
112114
115+ /**
116+ * @var StreamFactory
117+ */
118+ private $ streamFactory ;
119+
113120 /**
114121 * @var Plugin[]
115122 */
@@ -141,6 +148,7 @@ public function __construct(HttpClient $httpClient = null)
141148 {
142149 $ this ->httpClient = $ httpClient ?: HttpClientDiscovery::find ();
143150 $ this ->messageFactory = MessageFactoryDiscovery::find ();
151+ $ this ->streamFactory = StreamFactoryDiscovery::find ();
144152
145153 $ this ->responseHistory = new History ();
146154 $ this ->addPlugin (new GithubExceptionThrower ());
@@ -382,7 +390,7 @@ public function addHeaders(array $headers)
382390 public function addCache (CacheItemPoolInterface $ cachePool )
383391 {
384392 $ this ->removeCache ();
385- $ this ->addPlugin (new Plugin \CachePlugin ($ cachePool ));
393+ $ this ->addPlugin (new Plugin \CachePlugin ($ cachePool, $ this -> streamFactory ));
386394 }
387395
388396 /**
You can’t perform that action at this time.
0 commit comments