Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ce3a15

Browse files
bug #45004 [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for (plozmun)
This PR was merged into the 5.3 branch. Discussion ---------- [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for | Q | A | ------------- | --- | Branch? | 5.3, | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Similar to #44890 but this function was introduced in 5.1 #37927 Commits ------- 3d2ed70 [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for
2 parents 01640e8 + 3d2ed70 commit 7ce3a15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpClient/Response/HttplugPromise.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpClient\Response;
1313

14-
use function GuzzleHttp\Promise\promise_for;
14+
use GuzzleHttp\Promise\Create;
1515
use GuzzleHttp\Promise\PromiseInterface as GuzzlePromiseInterface;
1616
use Http\Promise\Promise as HttplugPromiseInterface;
1717
use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface;
@@ -74,7 +74,7 @@ private function wrapThenCallback(?callable $callback): ?callable
7474
}
7575

7676
return static function ($value) use ($callback) {
77-
return promise_for($callback($value));
77+
return Create::promiseFor($callback($value));
7878
};
7979
}
8080
}

0 commit comments

Comments
 (0)