N°5809 Update guzzlehttp/guzzle from 7.7.0 to 7.8.1

This commit is contained in:
Pierre Goiffon
2024-01-25 17:24:04 +01:00
parent fde01d5004
commit f3d3ec6ef7
59 changed files with 531 additions and 429 deletions

View File

@@ -19,9 +19,7 @@ final class Each
* index, and the aggregate promise. The callback can invoke any necessary
* side effects and choose to resolve or reject the aggregate if needed.
*
* @param mixed $iterable Iterator or array to iterate over.
* @param callable $onFulfilled
* @param callable $onRejected
* @param mixed $iterable Iterator or array to iterate over.
*/
public static function of(
$iterable,
@@ -44,8 +42,6 @@ final class Each
*
* @param mixed $iterable
* @param int|callable $concurrency
* @param callable $onFulfilled
* @param callable $onRejected
*/
public static function ofLimit(
$iterable,
@@ -67,7 +63,6 @@ final class Each
*
* @param mixed $iterable
* @param int|callable $concurrency
* @param callable $onFulfilled
*/
public static function ofLimitAll(
$iterable,

View File

@@ -135,7 +135,7 @@ class EachPromise implements PromisorInterface
// Add only up to N pending promises.
$concurrency = is_callable($this->concurrency)
? call_user_func($this->concurrency, count($this->pending))
? ($this->concurrency)(count($this->pending))
: $this->concurrency;
$concurrency = max($concurrency - count($this->pending), 0);
// Concurrency may be set to 0 to disallow new promises.
@@ -170,8 +170,7 @@ class EachPromise implements PromisorInterface
$this->pending[$idx] = $promise->then(
function ($value) use ($idx, $key): void {
if ($this->onFulfilled) {
call_user_func(
$this->onFulfilled,
($this->onFulfilled)(
$value,
$key,
$this->aggregate
@@ -181,8 +180,7 @@ class EachPromise implements PromisorInterface
},
function ($reason) use ($idx, $key): void {
if ($this->onRejected) {
call_user_func(
$this->onRejected,
($this->onRejected)(
$reason,
$key,
$this->aggregate

View File

@@ -18,7 +18,7 @@ class RejectionException extends \RuntimeException
* @param mixed $reason Rejection reason.
* @param string|null $description Optional description.
*/
public function __construct($reason, $description = null)
public function __construct($reason, string $description = null)
{
$this->reason = $reason;