Skip to content

Commit aef36ab

Browse files
authored
change \GuzzleHttp\Promise\all to \GuzzleHttp\Promise\Utils::all (#361)
* change \GuzzleHttp\Promise\all to \GuzzleHttp\Promise\Utils::all * support old promises as well * run unit tests only on pull_request
1 parent 3f84692 commit aef36ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/unit_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Run Unit Tests
22
on:
3-
push:
43
pull_request:
54
jobs:
65
tests:

src/ObjectStore/v1/Models/Container.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ public function createLargeObject(array $data): StorageObject
233233
}
234234

235235
/** @var Promise $p */
236-
$p = \GuzzleHttp\Promise\all($promises);
236+
$p = function_exists('\GuzzleHttp\Promise\all')
237+
? \GuzzleHttp\Promise\all($promises)
238+
: \GuzzleHttp\Promise\Utils::all($promises);
237239
$p->wait();
238240

239241
return $this->createObject([

0 commit comments

Comments
 (0)