Skip to content

Commit

Permalink
change \GuzzleHttp\Promise\all to \GuzzleHttp\Promise\Utils::all (#361)
Browse files Browse the repository at this point in the history
* change \GuzzleHttp\Promise\all to \GuzzleHttp\Promise\Utils::all

* support old promises as well

* run unit tests only on pull_request
  • Loading branch information
k0ka authored Jun 24, 2023
1 parent 3f84692 commit aef36ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Run Unit Tests
on:
push:
pull_request:
jobs:
tests:
Expand Down
4 changes: 3 additions & 1 deletion src/ObjectStore/v1/Models/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ public function createLargeObject(array $data): StorageObject
}

/** @var Promise $p */
$p = \GuzzleHttp\Promise\all($promises);
$p = function_exists('\GuzzleHttp\Promise\all')
? \GuzzleHttp\Promise\all($promises)
: \GuzzleHttp\Promise\Utils::all($promises);
$p->wait();

return $this->createObject([
Expand Down

0 comments on commit aef36ab

Please sign in to comment.