Skip to content

Commit

Permalink
Fixed calls to deprecated promise functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed May 21, 2023
1 parent eaf47e3 commit 3372bcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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']);
Expand Down

0 comments on commit 3372bcf

Please sign in to comment.