diff --git a/composer.json b/composer.json index 5f91a29..379e59e 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.19" + "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "autoload": { "psr-4": { diff --git a/src/ServiceClient.php b/src/ServiceClient.php index c8118d0..0bfb957 100644 --- a/src/ServiceClient.php +++ b/src/ServiceClient.php @@ -121,7 +121,7 @@ public function executeAllAsync($commands, array $options = []) } // Convert the iterator of commands to a generator of promises. - $commands = Promise\iter_for($commands); + $commands = Promise\Create::iterFor($commands); $promises = function () use ($commands) { foreach ($commands as $key => $command) { if (!$command instanceof CommandInterface) { @@ -166,7 +166,7 @@ public function __call($name, array $args) private function createCommandHandler() { return function (CommandInterface $command) { - return Promise\coroutine(function () use ($command) { + return Promise\Coroutine::of(function () use ($command) { // Prepare the HTTP options. $opts = $command['@http'] ?: []; unset($command['@http']);