Skip to content

Commit

Permalink
Fix: missing stream factory (#123)
Browse files Browse the repository at this point in the history
* Fix: Missing stream factory

* Fix: Missing stream factory
  • Loading branch information
steache authored Aug 28, 2023
1 parent 1d6fa8a commit 2c1034c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Maclof\Kubernetes\Repositories\RoleRepository;
use Maclof\Kubernetes\Repositories\ServiceAccountRepository;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Symfony\Component\Yaml\Yaml;
use Symfony\Component\Yaml\Exception\ParseException as YamlParseException;

Expand Down Expand Up @@ -144,13 +145,14 @@ class Client
/**
* The constructor.
*/
public function __construct(array $options = [], RepositoryRegistry $repositoryRegistry = null, ClientInterface $httpClient = null, HttpRequestFactory $httpRequestFactory = null)
public function __construct(array $options = [], RepositoryRegistry $repositoryRegistry = null, ClientInterface $httpClient = null, HttpRequestFactory $httpRequestFactory = null, StreamFactoryInterface $streamFactory = null)
{
$this->setOptions($options);
$this->classRegistry = $repositoryRegistry ?: new RepositoryRegistry();
$this->httpClient = new HttpMethodsClient(
$httpClient ?: Psr18ClientDiscovery::find(),
$httpRequestFactory ?: Psr17FactoryDiscovery::findRequestFactory()
$httpRequestFactory ?: Psr17FactoryDiscovery::findRequestFactory(),
$streamFactory ?: Psr17FactoryDiscovery::findStreamFactory()
);
}

Expand Down

0 comments on commit 2c1034c

Please sign in to comment.