PHPackages                             wotek/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. [API Development](/categories/api)
4. /
5. wotek/response-builder

ActiveLibrary[API Development](/categories/api)

wotek/response-builder
======================

HTTP Response Builder

0.6(9y ago)09.5k↓33.3%MIT LicencePHP

Since Feb 2Pushed 9y agoCompare

[ Source](https://github.com/wotek/response-builder)[ Packagist](https://packagist.org/packages/wotek/response-builder)[ RSS](/packages/wotek-response-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Response Builder
================

[](#response-builder)

[![Build Status](https://camo.githubusercontent.com/3dc86e3daf1391a9d383846c052fc3cbbcf96d21739d8aedebb5a857be4f4081/68747470733a2f2f7472617669732d63692e6f72672f776f74656b2f726573706f6e73652d6275696c6465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/wotek/response-builder)[![Coverage Status](https://camo.githubusercontent.com/1bc6dee867e0b2f6172cd58c78e6725c3b6f749bb160c86b3b2d914b22eea9c0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f776f74656b2f726573706f6e73652d6275696c6465722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/wotek/response-builder?branch=master)

Let's say, you're building an API for you application. You need to:

- Return responses in few formats
- Want to have ability to version reponse body schema
- have ability to version reponse headers schema
- have simple Response Factory API and use predefined responses

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

[](#installation)

Installation is fairly simple. We recommend using *composer*.

### Use composer

[](#use-composer)

If you don't have Composer yet, download it following the instructions on  or just run the following command:

```
curl -s http://getcomposer.org/installer | php
```

After composer is installed add package running following in root dir of your project:

```
# Composer will automaticaly download & install & modify your composer.json
composer require wotek/response-builder:dev-master
```

### Clone repository

[](#clone-repository)

If you're not fan of composer. You can just *clone* repository.

```
# Clones repository to settings folder
git clone git@github.com:wotek/response-builder.git .
```

Documentation
-------------

[](#documentation)

- [Installation](doc/installation.md)
- [Usage](doc/usage.md)
- [Creating Factories](doc/creating_factories.md)
- [Response Prototypes](doc/response_prototypes.md)
- [Response Serializers](doc/creating_serializers.md)
- [Complete Example](doc/complete_example.md)
- [Howto's](doc/howto.md)

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2014 Wojciech Zalewski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

2

Last Release

3412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18704ffaf2853b238693ebe63a518eeb1aa62bc897f745bb31767c7fe1978132?d=identicon)[wotek](/maintainers/wotek)

---

Tags

responsejsonapixmlbuilderresponse prototype

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nathanmac/parser

Simple PHP Parser Utility Library for API Development

2151.0M3](/packages/nathanmac-parser)[mtownsend/response-xml

The missing XML support for Laravel's Response class.

1041.2M3](/packages/mtownsend-response-xml)[nilportugues/laravel5-json-api

Laravel 5 JSON API Transformer Package

31232.4k1](/packages/nilportugues-laravel5-json-api)[nilportugues/api-problems

PSR7 Response implementation for the Problem Details for HTTP APIs

1749.4k2](/packages/nilportugues-api-problems)[obiefy/api-response

Simple Laravel package to return Json responses.

17324.6k](/packages/obiefy-api-response)[nilportugues/jsonapi-bundle

Symfony 2 &amp; 3 JSON API Transformer Package

11446.0k](/packages/nilportugues-jsonapi-bundle)

PHPackages © 2026

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