PHPackages                             jooservices/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. jooservices/client

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

jooservices/client
==================

Strict, extensible PHP 8.5+ HTTP client wrapper for JOOservices

v1.3.0(1mo ago)02061[2 PRs](https://github.com/jooservices/client/pulls)3MITPHPPHP ^8.5CI passing

Since Jan 31Pushed 1mo agoCompare

[ Source](https://github.com/jooservices/client)[ Packagist](https://packagist.org/packages/jooservices/client)[ RSS](/packages/jooservices-client/feed)WikiDiscussions develop Synced 3w ago

READMEChangelog (6)Dependencies (37)Versions (11)Used By (3)

JOOservices HTTP Client
=======================

[](#jooservices-http-client)

A robust, layered HTTP client wrapper designed for extensibility, strict typing, and high performance. Built with a clean, package-oriented architecture that decouples transport integration from client behavior.

[![CI](https://github.com/jooservices/client/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/jooservices/client/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/7b5aad8d94338e747ce58ac6900fe0069a3fc891200bb53882e33647fac9d114/68747470733a2f2f636f6465636f762e696f2f67682f6a6f6f73657276696365732f636c69656e742f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/jooservices/client)[![OpenSSF Scorecard](https://camo.githubusercontent.com/bd0f839e27845a9b96d30f7abd6f47dc4942cc9d4dfcab561d18e979b911cc47/68747470733a2f2f6170692e736563757269747973636f726563617264732e6465762f70726f6a656374732f6769746875622e636f6d2f6a6f6f73657276696365732f636c69656e742f6261646765)](https://securityscorecards.dev/viewer/?uri=github.com/jooservices/client)[![PHP Version](https://camo.githubusercontent.com/3fe1b9f28029d16b30242054cf5a6fe168f12cee4d294ec395f5bca64b874909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e352d626c7565)](https://php.net/)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://opensource.org/licenses/MIT)[![Docker](https://camo.githubusercontent.com/5dbf15dd763dd6ad305d9ac2cc07a7b19027e2db5320577c90ff7310942f6e10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f636b65722d656e61626c65642d3234393645443f6c6f676f3d646f636b6572266c6f676f436f6c6f723d7768697465)](Dockerfile)[![Packagist](https://camo.githubusercontent.com/3e49027eb04a3f1c9311050a310a5074111ae538dadc91da17ed20f937256ae7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6f73657276696365732f636c69656e74)](https://packagist.org/packages/jooservices/client)[![Latest Release](https://camo.githubusercontent.com/e685e5221ec9dd62984ce66106fcaacd5bdee08c6a51635e58d24bce44be26a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6a6f6f73657276696365732f636c69656e74)](https://github.com/jooservices/client/releases)[![AI Workflow](https://camo.githubusercontent.com/0d90c9468791301baffd6ee14f1bfa69ec670a4059c79a2c0320564b514b4fe8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41492d576f726b666c6f772d696e666f726d6174696f6e616c)](docs/04-development/ai-skills.md)

Features
--------

[](#features)

- **Strictly Typed**: Configuration object (`ClientConfig`) ensures type safety before requests start.
- **Layered Architecture**: Adapters (Guzzle) are isolated from Core Logic.
- **Resilience**: Built-in Retry (Backoff/Jitter) and Circuit Breaker.
- **Async &amp; Concurrency**: Support for non-blocking requests (`getAsync`) and Batch Processing.
- **Observability**: detailed Logging and PSR-16 Caching integration.
- **Performance**: &lt; 10μs overhead per request.

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

[](#installation)

```
composer require jooservices/client
```

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

Use the **ClientBuilder** to create an instance.

```
use JOOservices\Client\Client\ClientBuilder;

$client = ClientBuilder::create()
    ->withBaseUri('https://api.example.com')
    ->withTimeout(5)
    ->withHeader('Authorization', 'Bearer token')
    ->build();

$response = $client->get('/users/1');

echo $response->status(); // 200
print_r($response->json()); // ['id' => 1, ...]
```

### Async Requests &amp; Batching

[](#async-requests--batching)

```
// Single Async Request
$promise = $client->getAsync('/users/1');
$response = $promise->wait();

// Batch Processing (Concurrent)
$results = $client->batch([
    'user1' => fn() => $client->getAsync('/users/1'),
    'user2' => fn() => $client->getAsync('/users/2'),
]);

print_r($results['user1']->json());
```

Advanced Configuration
----------------------

[](#advanced-configuration)

### Resilience (Retry &amp; Circuit Breaker)

[](#resilience-retry--circuit-breaker)

```
use JOOservices\Client\Resilience\RetryConfig;
use JOOservices\Client\Resilience\CircuitBreakerConfig;

$client = ClientBuilder::create()
    ->withRetry(new RetryConfig(
        maxAttempts: 3,
        baseDelayMs: 100
    ))
    ->withCircuitBreaker(new CircuitBreakerConfig(
        failureThreshold: 5,
        recoveryTimeoutMs: 10000
    ))
    ->build();
```

### Logging &amp; Caching

[](#logging--caching)

```
use JOOservices\Client\Logging\MonologFactory;
use JOOservices\Client\Cache\FilesystemCache;

$logger = MonologFactory::createDaily('my-app', __DIR__ . '/logs');
$cache = new FilesystemCache(__DIR__ . '/cache');

$client = ClientBuilder::create()
    ->withLogger($logger, logBodies: true)
    ->withCache($cache, defaultTtl: 3600)
    ->build();
```

Request and response body logging should stay opt-in. Keep `logBodies: false` unless the integration explicitly needs body-level diagnostics and the payload is safe to record.

Quality Assurance
-----------------

[](#quality-assurance)

The repository uses the DTO-style quality contract with a few client-specific additions.

```
composer check
```

Run `composer lint:all` and `composer test` directly when you want the underlying steps separately; use `composer check` for the standard combined gate.

Additional validation commands:

- `composer lint:fix`
- `composer test:coverage`
- `composer bench`
- `composer ci`

Intentional client-specific differences from the DTO baseline:

- 98% coverage gate on `composer test:coverage`
- dedicated benchmark workflow with PHPBench
- optional live-network workflow for real external IP logging checks
- active CI secret scanning via `secret-scanning.yml`

Repository-standard auxiliary automation now also matches DTO more closely:

- semantic PR titles require an uppercase subject
- pull requests are auto-labeled with DTO-style label categories
- releases validate tags before publishing GitHub releases and can notify Packagist when credentials are configured

Coverage remains an intentional client-specific divergence: this repo keeps a 98% gate and a narrower excluded-source set so the enforced threshold stays meaningful for the exercised client runtime surface.

AI Development Workflow
-----------------------

[](#ai-development-workflow)

This package includes AI-oriented scaffolding to keep delivery consistent with quality gates.

- Agent guidance: [AGENTS.md](AGENTS.md), [CLAUDE.md](CLAUDE.md)
- Tooling folders: `.claude/commands`, `.cursor/rules`, `ai/skills`, `antigravity/prompts`, `jetbrains/prompts`
- Development process references: [docs/04-development](docs/04-development), [docs/05-maintenance](docs/05-maintenance)

When AI changes code, run:

```
composer check
```

Docker Development
------------------

[](#docker-development)

If PHP is not installed locally, run everything in Docker.

```
docker compose up -d --build mongodb
docker compose run --rm php composer install
docker compose run --rm php composer test
```

For live network integration tests (real sites), run:

```
docker compose run --rm -e JOOCLIENT_RUN_LIVE_NETWORK_TESTS=1 php \
    vendor/bin/phpunit tests/Feature/Logging/RealSiteIpLoggingTest.php
```

This test hits:

- `https://httpbin.org/get`
- `https://example.com`
- `https://google.com`

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Normal feature and fix work branches from `develop` and PRs back into `develop`. Release preparation uses `release/` branches from `develop` into `master`.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.8% 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 ~20 days

Total

6

Last Release

44d ago

Major Versions

0.5.0 → 1.0.02026-03-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/142772948?v=4)[JOOservices Ltd](/maintainers/jooservices)[@jooservices](https://github.com/jooservices)

---

Top Contributors

[![soulevilx](https://avatars.githubusercontent.com/u/2688707?v=4)](https://github.com/soulevilx "soulevilx (56 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

asynccachecircuit-breakerconcurrencydtoguzzlehttp-clientjooservicesloggingphpphp85psrpsr-16psr-3retryasynclogginghttp clientGuzzlecacheretrydtocircuit breakerJOOservices

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jooservices-client/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M518](/packages/shopware-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)

PHPackages © 2026

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