Skip to content

Commit 3372bcf

Browse files
Fixed calls to deprecated promise functions
1 parent eaf47e3 commit 3372bcf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"require-dev": {
3434
"bamarni/composer-bin-plugin": "^1.8.1",
35-
"phpunit/phpunit": "^8.5.19"
35+
"phpunit/phpunit": "^8.5.19 || ^9.5.8"
3636
},
3737
"autoload": {
3838
"psr-4": {

src/ServiceClient.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function executeAllAsync($commands, array $options = [])
121121
}
122122

123123
// Convert the iterator of commands to a generator of promises.
124-
$commands = Promise\iter_for($commands);
124+
$commands = Promise\Create::iterFor($commands);
125125
$promises = function () use ($commands) {
126126
foreach ($commands as $key => $command) {
127127
if (!$command instanceof CommandInterface) {
@@ -166,7 +166,7 @@ public function __call($name, array $args)
166166
private function createCommandHandler()
167167
{
168168
return function (CommandInterface $command) {
169-
return Promise\coroutine(function () use ($command) {
169+
return Promise\Coroutine::of(function () use ($command) {
170170
// Prepare the HTTP options.
171171
$opts = $command['@http'] ?: [];
172172
unset($command['@http']);

0 commit comments

Comments
 (0)