PHPackages                             einar-hansen/http-client-factory - 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. einar-hansen/http-client-factory

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

einar-hansen/http-client-factory
================================

Common interface for HTTP client factories

v1.1.3(3y ago)015MITPHPPHP ^7.0 || ^8.0

Since Aug 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/einar-hansen/http-client-factory)[ Packagist](https://packagist.org/packages/einar-hansen/http-client-factory)[ Docs](https://github.com/einar-hansen/http-client-factory)[ RSS](/packages/einar-hansen-http-client-factory/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

HTTP Client Factory
===================

[](#http-client-factory)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8d1857a6fa49368460b794e46fc3d2e70ef3d0b8257eca0416f3defb74a12114/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65696e61722d68616e73656e2f687474702d636c69656e742d666163746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/einar-hansen/http-client-factory)[![Total Downloads](https://camo.githubusercontent.com/00d822f08a9b2b4a0dcac72ac23045c59541bf422e968440dd9c65cbcd40c5a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65696e61722d68616e73656e2f687474702d636c69656e742d666163746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/einar-hansen/http-client-factory)

This repository holds the interface for new http factories that return a [PSR-18 (HTTP Client)](https://www.php-fig.org/psr/psr-18) client.

Note that this is not a HTTP Client Factory implementation. For an example, checkout the [Guzzle Client Factory](https://packagist.org/packages/einar-hansen/guzzle-client-factory)

The installable [package](https://packagist.org/packages/einar-hansen/http-client-factory) and [dependents](https://packagist.org/packages/einar-hansen/http-client-factory/dependents) are listed on Packagist.

Installation
------------

[](#installation)

```
composer require einar-hansen/http-client-factory
```

Testing
-------

[](#testing)

```
# Install packages
docker run --rm --interactive --tty --volume $(pwd):/app composer install

# Run code style formatting and static analysis
docker run -it -v $(pwd):/app -w /app php:8.1-alpine vendor/bin/pint
docker run -it -v $(pwd):/app -w /app php:8.1-alpine vendor/bin/phpstan --level=9 analyse src
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

1369d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7867c8e6cb949ab73460f6189d49e8423431864c495a389e650e82509e44d954?d=identicon)[einar-hansen](/maintainers/einar-hansen)

---

Top Contributors

[![einarjohanhansen](https://avatars.githubusercontent.com/u/72568829?v=4)](https://github.com/einarjohanhansen "einarjohanhansen (8 commits)")[![einar-hansen](https://avatars.githubusercontent.com/u/49709354?v=4)](https://github.com/einar-hansen "einar-hansen (5 commits)")

---

Tags

httppsrhttp clientpsr-18einareinar-hansenhttp-client-factory

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/einar-hansen-http-client-factory/health.svg)

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

###  Alternatives

[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)

PHPackages © 2026

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