PHPackages                             delolmo/valinor-http-message - 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. delolmo/valinor-http-message

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

delolmo/valinor-http-message
============================

Use psr/http-message as a Valinor source

2.3(3mo ago)135PHPPHP &gt;=8.4CI passing

Since Jan 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/delolmo/valinor-http-message)[ Packagist](https://packagist.org/packages/delolmo/valinor-http-message)[ RSS](/packages/delolmo-valinor-http-message/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (36)Versions (8)Used By (0)

The following library allows using `ServerRequestInterface` objects of the [psr/http-message](https://github.com/php-fig/http-message) library as a source for the [cuyz/valinor](https://github.com/cuyz/valinor) library.

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

[](#installation)

```
composer require delolmo/valinor-http-message
```

Example
-------

[](#example)

```
use App\DTO\CustomObject;
use CuyZ\Valinor\Mapper\Source\Source;
use CuyZ\Valinor\MapperBuilder;
use DelOlmo\Valinor\Mapping\Source\ServerRequestSource;
use Psr\Http\Message\ServerRequestInterface;

final class CustomController
{
    public function execute(ServerRequestInterface $request)
    {
        // Create the Source using the new InputSource
        $source = Source::iterable(new ServerRequestSource($input));

        // Create the Mapper, using the desired configuration
        $mapper = new MapperBuilder())
            ->allowSuperfluousKeys()
            ->enableFlexibleCasting()
            ->mapper();

        // Map the source to whatever object makes sense
        $mapped = $mapper->map(CustomObject::class, $source);

        // Apply whatever business logic makes sense from here
        // ...
    }
}
```

Final notes
-----------

[](#final-notes)

- Versioning of `delolmo/valinor-http-message` will always match `cuyz/valinor` versions. Same goes for PHP versions.
- Although query params and body params should not share the same name in the Request, it should be noted that, from a ServerRequestSource standpoint, query params always take precedence over body params. That is, if there is a query param and a body param sharing the same name, ServerRequestSource will only use the query param's value for mapping purposes.
- Considering that many query and body params are retrieved as strings or arrays, it is interesting to note that `enableFlexibleCasting` should also be configured in the Mapper. See [Enabling flexible casting](https://valinor.cuyz.io/latest/mapping/type-strictness/#enabling-flexible-casting) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance80

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Recently: every ~214 days

Total

7

Last Release

105d ago

Major Versions

1.7.2 → 2.0.02025-11-18

PHP version history (4 changes)1.2PHP ~8.0.0 || ~8.1.0 || ~8.2.0

1.7PHP ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

2.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

2.3PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/659868?v=4)[Antonio del Olmo](/maintainers/delolmo)[@delolmo](https://github.com/delolmo)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/delolmo-valinor-http-message/health.svg)

```
[![Health](https://phpackages.com/badges/delolmo-valinor-http-message/health.svg)](https://phpackages.com/packages/delolmo-valinor-http-message)
```

###  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)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9067.8k](/packages/n1ebieski-ksef-php-client)[tempest/framework

The PHP framework that gets out of your way.

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

PHPackages © 2026

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