Skip to content

Commit

Permalink
Use Create::promiseFor instead of promise_for
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Oct 8, 2020
1 parent 0059edc commit de7032c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Client/PsrClickHouseAsyncClient.php
Expand Up @@ -5,6 +5,7 @@
namespace SimPod\ClickHouseClient\Client;

use DateTimeZone;
use GuzzleHttp\Promise\Create;
use GuzzleHttp\Promise\PromiseInterface;
use Http\Client\HttpAsyncClient;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -17,8 +18,6 @@
use SimPod\ClickHouseClient\Sql\SqlFactory;
use SimPod\ClickHouseClient\Sql\ValueFormatter;

use function GuzzleHttp\Promise\promise_for;

class PsrClickHouseAsyncClient implements ClickHouseAsyncClient
{
private HttpAsyncClient $asyncClient;
Expand Down Expand Up @@ -102,7 +101,7 @@ private function executeRequest(
)
);

$promise = promise_for($this->asyncClient->sendAsyncRequest($request));
$promise = Create::promiseFor($this->asyncClient->sendAsyncRequest($request));

return $promise->then(
static function (ResponseInterface $response) use ($processResponse) {
Expand Down

0 comments on commit de7032c

Please sign in to comment.