PHPackages                             phprise/http-request - 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. phprise/http-request

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

phprise/http-request
====================

Atomic repository for Requests of HTTP Connector based on the OTAKU Manifesto.

v1.0.0(5mo ago)011MITPHPPHP ^8.4

Since Jan 22Pushed 5mo agoCompare

[ Source](https://github.com/phprise-foundation/http-request)[ Packagist](https://packagist.org/packages/phprise/http-request)[ RSS](/packages/phprise-http-request/feed)WikiDiscussions 1.x Synced today

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

phprise/http-request
====================

[](#phprisehttp-request)

The Atomic Repository is the smallest possible unit of granularity. It enforces a strict architectural boundary through the following rules:

1. **No Subdirectories**: Only one level of directory inside src/.
2. **Maximum 10 Files**: Only 10 files per package.
3. **Strict Typing**: Mandatory `declare(strict_types=1)` and full type hinting for all properties and methods.
4. **Object Calisthenics**: Maximum of 50 lines per class and 2 instance variables to ensure extreme cohesion.
5. **Value Objects**: All primitives must be wrapped. Raw strings or integers are not permitted in domain logic.
6. **First Class Collections**: Arrays are forbidden for data transport; use dedicated Collection objects.
7. **Tell, Don't Ask**: Getters and setters are prohibited. Objects must expose behavior, not state.
8. **Infrastructure Ignorance**: The domain core is decoupled from persistence, frameworks, and external tools.
9. **Logic Flow**: The `else` keyword is banned. Use guard clauses and early returns to minimize indentation.

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

[](#installation)

Install the package via composer:

```
composer require phprise/http-request
```

Usage
-----

[](#usage)

This repository contains specialized HTTP request objects. It is an **Atom** of the HTTP system, designed to handle the structure of different HTTP methods with strict typing and immutability.

### Specialized Requests

[](#specialized-requests)

Instead of generic requests, use specialized classes that enforce the correct HTTP method and structure.

#### Store (POST)

[](#store-post)

Used for creating resources. Requires a URI and a `TransferObjectInterface` payload.

```
use Phprise\Http\Request\StoreRequest;
use Phprise\Http\ValueObject\Uri;

$request = new StoreRequest(
    new Uri('https://api.example.com/users'),
    $userDto
);

echo $request->getMethod(); // POST
```

#### Update (PATCH) / Replace (PUT)

[](#update-patch--replace-put)

Used for modifying resources.

```
use Phprise\Http\Request\UpdateRequest;

$request = new UpdateRequest($uri, $patchDto);
echo $request->getMethod(); // PATCH
```

#### List (GET) / Show (GET)

[](#list-get--show-get)

Used for retrieving resources.

```
use Phprise\Http\Request\ListRequest;

$request = new ListRequest($uri);
echo $request->getMethod(); // GET
```

### Request Context

[](#request-context)

All requests wrap a `RequestContext`, allowing you to immutably modify headers or protocol versions while maintaining the specialized request type.

```
$request = $request->withHeader('X-Custom', 'Value');
```

Note

This atom segregates request logic from the actual transmission (Connector), ensuring that request structure is defined by the domain's needs.

Philosophy
----------

[](#philosophy)

We follow **The OTAKU Manifesto: Fluid Structure Design**.

1. **O** - Own your Discipline (Be strict with yourself)
2. **T** - Tools for Composition (Compose like Unix)
3. **A** - Armor the Core (Protect the heart of the business)
4. **K** - Keep Infrastructure Silent (Infrastructure is just a detail)
5. **U** - Universal Language &amp; Contracts (Speak the user's language via clear contracts)

Please read more about it in [PHILOSOPHY.md](PHILOSOPHY.md).

License
-------

[](#license)

MIT License

Free to use, modify, and distribute.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance71

Regular maintenance activity

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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 ~0 days

Total

2

Last Release

161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b1815540bc9ab8012b61aa12e1a35025d9a0b11a1642977192fd173b6bfc5aa?d=identicon)[esdras-schonevald](/maintainers/esdras-schonevald)

---

Top Contributors

[![esdras-schonevald](https://avatars.githubusercontent.com/u/64711203?v=4)](https://github.com/esdras-schonevald "esdras-schonevald (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phprise-http-request/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[laudis/neo4j-php-client

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

185702.8k43](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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