PHPackages                             free-elephants/static-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. free-elephants/static-http-client

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

free-elephants/static-http-client
=================================

PSR-18 implementation for work with file fixtures

0.0.3(1y ago)0699BSD-3-ClausePHPCI passing

Since Apr 22Pushed 1y ago3 watchersCompare

[ Source](https://github.com/FreeElephants/static-http-client)[ Packagist](https://packagist.org/packages/free-elephants/static-http-client)[ RSS](/packages/free-elephants-static-http-client/feed)WikiDiscussions master Synced 1w ago

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

Static Http Client
==================

[](#static-http-client)

[PSR-18](http://www.php-fig.org/psr/psr-18) implementation for testing. Use static files for mock responses and write requests.

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

[](#installation)

```
composer require free-elephants/static-http-client --dev
```

Usage
-----

[](#usage)

See tests for more examples.

```
public function test()
{
    $stubbedHttpClient = new \FreeElephants\StaticHttpClient\StaticHttpClient(
        $responseFactory,
        new \FreeElephants\StaticHttpClient\PathResolver\PathBuilderBasedResolver(
            new \FreeElephants\StaticHttpClient\PathBuilder\Composite(
                new \FreeElephants\StaticHttpClient\PathBuilder\PrependBasePath(__DIR__),
                new \FreeElephants\StaticHttpClient\PathBuilder\PrependHostnameAsDirectory(),
                new \FreeElephants\StaticHttpClient\PathBuilder\AppendRequestPath(),
                new \FreeElephants\StaticHttpClient\PathBuilder\AppendDefaultFileExtension('.json'),
            )
        )
    );

    $response = $stubbedHttpClient->sendRequest(new \Nyholm\Psr7\Request('GET', 'https://example.com/foo')); // resolved as __DIR__ . '/example.com/foo.json'
}
```

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance42

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity32

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.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b764f6cd1eb52054cf0e07297309c60e37382542268822b3bd5edd97729d056?d=identicon)[samizdam](/maintainers/samizdam)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/free-elephants-static-http-client/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6943.5M449](/packages/drupal-core-recommended)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.7M10](/packages/chargebee-chargebee-php)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

187738.3k49](/packages/laudis-neo4j-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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