PHPackages                             crell/response-builder - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. crell/response-builder

Abandoned → [crell/http-tools](/?search=crell%2Fhttp-tools)Library[Utility &amp; Helpers](/categories/utility)

crell/response-builder
======================

0.3.2(11mo ago)242LGPL-3.0-or-laterPHPPHP ~8.1CI passing

Since May 13Pushed 9mo agoCompare

[ Source](https://github.com/Crell/HttpTools)[ Packagist](https://packagist.org/packages/crell/response-builder)[ Docs](https://github.com/Crell/HttpTools)[ GitHub Sponsors](https://github.com/Crell)[ RSS](/packages/crell-response-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (7)Used By (0)

PSR HTTP Tools
==============

[](#psr-http-tools)

[![Latest Version on Packagist](https://camo.githubusercontent.com/220647ab1493e1a8a33c3184be5b4102e720e5b3d889d4450c4a837ec4f041dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4372656c6c2f48747470546f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Crell/HttpTools)[![Software License](https://camo.githubusercontent.com/bf1c19b4a07c841715e713542bd6e9c2aaf75ffa2ee2aa3987814d99311f799b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4c47504c76332d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/33b27a16a212ea2105be9271e4715ef122c8790ddd49b783ddeaa6d598fe5685/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4372656c6c2f48747470546f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Crell/HttpTools)

This library is a loose collection of tools to make working with the PSR HTTP stack a bit easier.

Included tools
--------------

[](#included-tools)

### HttpStatus

[](#httpstatus)

Yet another Enum listing the different typical HTTP response codes used.

### ResponseBuilder

[](#responsebuilder)

ResponseBuilder is a simple convenience wrapper around the PSR-17 factory classes. It provides a single, easy to use "builder" class that produces common PSR-7 response objects types. You may bring your own PSR-17 factory of your choice.

See the [ResponseBuilder](src/ResponseBuilder.php) class, as its methods should be fairly self-explantory just from their names.

### CacheHeaderMiddleware

[](#cacheheadermiddleware)

This zero-configuration middleware ensures that cache headers are stripped from requests/responses that should not have them, according to the HTTP spec.

### EnforceHeadMiddleware

[](#enforceheadmiddleware)

Ensures that the response to a HEAD request has an empty body, even if one was incorrectly set.

### DefaultContentTypeMiddleware

[](#defaultcontenttypemiddleware)

Allows setting a default `content-type` and `accept` header value on incoming requests. Useful for APIs that allow clients to not specify those headers, without code further on needing to account for it being missing.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/Crell/HttpTools/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Larry Garfield](https://github.com/Crell)
- [All Contributors](../../contributors)

License
-------

[](#license)

The Lesser GPL version 3 or later. Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance54

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Total

6

Last Release

339d ago

PHP version history (2 changes)0.1.0PHP ~8.4

0.2.0PHP ~8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/12e28c223b88445f07d697c8805bd856066c947f70b535f6a7e00d2cb311c3c2?d=identicon)[Crell](/maintainers/Crell)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/crell-response-builder/health.svg)

```
[![Health](https://phpackages.com/badges/crell-response-builder/health.svg)](https://phpackages.com/packages/crell-response-builder)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)

PHPackages © 2026

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