PHPackages                             mattjanssen/api-response-bundle - 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. mattjanssen/api-response-bundle

ActiveSymfony-bundle[API Development](/categories/api)

mattjanssen/api-response-bundle
===============================

Symfony bundle for transforming controller action returns and exceptions into JSON API responses

v1.0.0(6y ago)79.6k4MITPHPPHP ^5.4|^7CI failing

Since Apr 15Pushed 6y ago1 watchersCompare

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

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

mattjanssen/api-response-bundle
===============================

[](#mattjanssenapi-response-bundle)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1faa119d7e3afc72d7b989303a1d9bf3c2b622225be794e0560b048817d79bc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174746a616e7373656e2f6170692d726573706f6e73652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mattjanssen/api-response-bundle)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/5bf06224e16893da8777442c842cffeb910395a2afb06ccec7e40f7e90c74464/68747470733a2f2f7472617669732d63692e6f72672f6d6174746a616e7373656e2f6170692d726573706f6e73652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mattjanssen/api-response-bundle)

`mattjanssen/api-response-bundle` is a slightly-opinionated Symfony bundle for transforming controller action returns and exceptions into a standardized JSON response. The serializer and CORS headers can be configured globally, per path, and per action via annotation.

Install
-------

[](#install)

Via Composer

```
$ composer require mattjanssen/api-response-bundle
```

Enable
------

[](#enable)

Enable the bundle in the kernel:

```
