PHPackages                             manyou/promise-http-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. manyou/promise-http-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

manyou/promise-http-client
==========================

Make a Symfony HttpClient to return Guzzle promises

0230PHP

Since Jan 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/manyou-io/promise-http-client)[ Packagist](https://packagist.org/packages/manyou/promise-http-client)[ RSS](/packages/manyou-promise-http-client/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Make a Symfony HttpClient to return Guzzle promises
===================================================

[](#make-a-symfony-httpclient-to-return-guzzle-promises)

Install
-------

[](#install)

```
composer require manyou/promise-http-client
```

If you don't have a [symfony/http-client-implementation](https://packagist.org/providers/symfony/http-client-implementation) yet:

```
composer require symfony/http-client
```

Example usage
-------------

[](#example-usage)

```
use Manyou\PromiseHttpClient\PromiseHttpClient;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Contracts\HttpClient\ResponseInterface;

$client = new PromiseHttpClient(HttpClient::create());
$promise = $client->request('GET', 'https://httpbin.org/status/429')->then(function (ResponseInterface $response) use ($client) {
    if ($response->getStatusCode() < 300) {
        return $response;
    }

    return $client->request('GET', 'https://httpbin.org/get');
});

/** @var ResponseInterface $response */
$response = $promise->wait();

echo $response->getStatusCode(); // 200
```

Credits
-------

[](#credits)

Most code of

- [src/PromiseHttpClient.php](https://github.com/manyou-io/promise-http-client/blob/master/src/PromiseHttpClient.php)
- [src/WaitLoop.php](https://github.com/manyou-io/promise-http-client/blob/master/src/WaitLoop.php)
- [tests/PromiseHttpClientTest.php](https://github.com/manyou-io/promise-http-client/blob/master/tests/PromiseHttpClientTest.php)

comes from the [HttplugClient](https://github.com/symfony/http-client/blob/master/HttplugClient.php) of the [Symfony HttpClient component](https://github.com/symfony/http-client).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd55d562fc537ed818ff960d49e850a51889572af53b383489abca8f40d047d0?d=identicon)[bohanwood](/maintainers/bohanwood)

---

Top Contributors

[![bohanwood](https://avatars.githubusercontent.com/u/8384161?v=4)](https://github.com/bohanwood "bohanwood (1 commits)")

### Embed Badge

![Health badge](/badges/manyou-promise-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/manyou-promise-http-client/health.svg)](https://phpackages.com/packages/manyou-promise-http-client)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
