PHPackages                             borschphp/headers - 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. borschphp/headers

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

borschphp/headers
=================

A library to help deal with headers.

1.0.1(3y ago)010MITPHPPHP ^7.4||^8.0

Since Feb 18Pushed 3y agoCompare

[ Source](https://github.com/borschphp/borschphp-headers)[ Packagist](https://packagist.org/packages/borschphp/headers)[ RSS](/packages/borschphp-headers/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Borsch - HTTP Headers
=====================

[](#borsch---http-headers)

A library to help deal with headers.
Convenient to deal with headers in your PSR-7 implementations.

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

[](#installation)

The package can be installed via [composer](https://getcomposer.org/). Simply run the following command:

`composer require borschphp/headers`

Usage
-----

[](#usage)

```
use Borsch\Http\Header;
use Borsch\Http\HeadersMap;

$content_type = new Header('Content-Type', 'application/json');
$content_disposition = new Header('Content-Disposition', 'attachment', 'filename="test.pdf"');
$accept_encoding = new Header('Accept-Encoding', 'gzip', 'deflate');
$cache_control = new Header('Cache-Control', 'no-cache');

$headers = new HeadersMap($content_type, $content_disposition, $accept_encoding);

$headers->add(
    new Header('Cache-Control', 'no-cache')
);

if ($headers->has('accept-encoding')) {
    echo $headers->get('ACCEPT-ENCODING')->__toString();
    // Accept-Encoding: gzip, deflate
}

foreach ($headers as $header) {
    /** @var Header $header */
    $name = $header->getName();
    $values = $header->getValues();
}
```

Tests
-----

[](#tests)

The package includes a set of tests (made with [Pest](https://pestphp.com/)) to ensure that everything is working as expected.
You can run the tests by executing the following command:

```
./vendor/bin/pest
```

License
-------

[](#license)

The package is licensed under the MIT license. See [License File](https://github.com/borschphp/borsch-headers/blob/master/LICENSE.md)for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

1229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1a70117520fe10a630d61c750bbe6888d174e9903825e741470f818ee2c5d1?d=identicon)[debuss-a](/maintainers/debuss-a)

---

Top Contributors

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

---

Tags

psr-7psr-17headerheaders

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/borschphp-headers/health.svg)

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

###  Alternatives

[psr/http-factory

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

1.9k747.1M2.7k](/packages/psr-http-factory)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k320.9M983](/packages/symfony-psr-http-message-bridge)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k257.8M3.3k](/packages/nyholm-psr7)[http-interop/http-factory-guzzle

An HTTP Factory using Guzzle PSR7

582175.4M651](/packages/http-interop-http-factory-guzzle)[laminas/laminas-diactoros

PSR HTTP Message implementations

548115.3M1.2k](/packages/laminas-laminas-diactoros)[nyholm/psr7-server

Helper classes to handle PSR-7 server requests

9527.5M414](/packages/nyholm-psr7-server)

PHPackages © 2026

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