PHPackages                             psr-mock/http - 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. psr-mock/http

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

psr-mock/http
=============

Lightweight mock implementations of PSR-18, PSR-17 and PSR-7 tailored to simplify unit testing.

1.0.1(2y ago)116.4k↑106.3%7MITPHP ^8.1CI passing

Since Mar 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/psr-mock/http)[ Packagist](https://packagist.org/packages/psr-mock/http)[ Docs](https://github.com/psr-mock)[ RSS](/packages/psr-mock-http/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (7)

**Lightweight mock implementations of a [PSR-18 HTTP Client](https://www.php-fig.org/psr/psr-18/), [PSR-17 HTTP Factories](https://www.php-fig.org/psr/psr-17/) and [PSR-7 Messages](https://www.php-fig.org/psr/psr-7/) tailored to simplify unit testing.**

This is a meta-package that includes all of the [PSR Mock](https://github.com/psr-mock) utility suite's HTTP packages.

This suite is largely intended for inclusion in libraries like SDKs that consume PSRs without requiring hard dependencies on specific libraries.

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)

Requirements
------------

[](#requirements)

- PHP 8.1+
- Composer 2.0+

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

[](#installation)

```
composer require psr-mock/http
```

Usage
-----

[](#usage)

Usage instructions for each discovery library can be found at the links below:

- [PSR-18 HTTP Client](https://github.com/psr-mock/http-client-implementation)
- [PSR-17 HTTP Factories](https://github.com/psr-mock/http-factory-implementation)
- [PSR-7 HTTP Messages](https://github.com/psr-mock/http-message-implementation)

Contributing
------------

[](#contributing)

Contributions are welcome! Please create issues and pull requests on the repository for the specific discovery library you're interested in.

As a meta-package, this repository is not intended to accept contributions.

---

This library is not produced or endorsed by, or otherwise affiliated with, the PHP-FIG.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~172 days

Total

3

Last Release

805d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.0.1PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3093?v=4)[Evan Sims](/maintainers/evansims)[@evansims](https://github.com/evansims)

---

Top Contributors

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

---

Tags

http-clienthttp-client-implementationhttp-factoryhttp-factory-implementationhttp-messagehttp-message-implementationmockpsrpsr-17psr-18psr-7unit-testingpsrpsr-7psr-17psr-18discoveryhttp-client-implementationhttp-factory-implementationhttp-message-implementation

### Embed Badge

![Health badge](/badges/psr-mock-http/health.svg)

```
[![Health](https://phpackages.com/badges/psr-mock-http/health.svg)](https://phpackages.com/packages/psr-mock-http)
```

###  Alternatives

[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[laminas/laminas-diactoros

PSR HTTP Message implementations

548105.8M965](/packages/laminas-laminas-diactoros)[elastic/transport

HTTP transport PHP library for Elastic products

2020.6M7](/packages/elastic-transport)[vultr/vultr-php

The Official Vultr API PHP Wrapper.

2243.9k1](/packages/vultr-vultr-php)[mezzio/mezzio-hal

Hypertext Application Language implementation for PHP and PSR-7

20456.9k6](/packages/mezzio-mezzio-hal)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

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