diff --git a/composer.json b/composer.json index a076b0c..858e76a 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": "~7.2", + "guzzlehttp/guzzle": "^6.3", "rappasoft/laravel-helpers": "^1.0" }, "require-dev": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 38e9e97..e670b3b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -21,7 +21,7 @@ - + diff --git a/src/MatrixHttpApi.php b/src/MatrixHttpApi.php index 87a112a..7e46800 100644 --- a/src/MatrixHttpApi.php +++ b/src/MatrixHttpApi.php @@ -6,7 +6,6 @@ use Aryess\PhpMatrixSdk\Exceptions\MatrixException; use Aryess\PhpMatrixSdk\Exceptions\MatrixHttpLibException; use Aryess\PhpMatrixSdk\Exceptions\MatrixRequestException; use GuzzleHttp\Client; -use GuzzleHttp\Exception\RequestException; /** * Contains all raw Matrix HTTP Client-Server API calls. @@ -93,7 +92,10 @@ class MatrixHttpApi { $this->client = new Client(); $this->default429WaitMs = $default429WaitMs; $this->useAuthorizationHeader = $useAuthorizationHeader; + } + public function setClient(Client $client) { + $this->client = $client; } /**