PHPackages                             nilportugues/haljson-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. nilportugues/haljson-bundle

ActiveLibrary[API Development](/categories/api)

nilportugues/haljson-bundle
===========================

HAL+JSON API Transformer Bundle for Symfony 2 and Symfony 3

1.3.2(9y ago)107894[1 issues](https://github.com/nilportugues/symfony2-hal-json-transformer/issues)MITPHPPHP &gt;=5.5.0

Since Aug 23Pushed 9y agoCompare

[ Source](https://github.com/nilportugues/symfony2-hal-json-transformer)[ Packagist](https://packagist.org/packages/nilportugues/haljson-bundle)[ Docs](http://nilportugues.com)[ RSS](/packages/nilportugues-haljson-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

Symfony HAL+JSON Transformer Bundle
===================================

[](#symfony-haljson-transformer-bundle)

For Symfony 2 and Symfony 3

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8137fb6a2539531ffe3d1260fd5145dfa7b39350aa85f723c9613c4902276aed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e696c706f727475677565732f73796d666f6e79322d68616c2d6a736f6e2d7472616e73666f726d65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nilportugues/symfony2-hal-json-transformer/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/f47be099650efbf875c67435f50b7e47295e2dac055202d0062991553f8c5b04/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33646238383532362d353631612d343936392d613733342d6366663563656462356166622f6d696e692e706e67)](https://insight.sensiolabs.com/projects/3db88526-561a-4969-a734-cff5cedb5afb)[![Latest Stable Version](https://camo.githubusercontent.com/bb0ca6e74a0088e23308e5749ea7314d044e8c99cad4a534322433d90ecf9371/68747470733a2f2f706f7365722e707567782e6f72672f6e696c706f727475677565732f68616c6a736f6e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/nilportugues/haljson-bundle)[![Total Downloads](https://camo.githubusercontent.com/1b1c71a5149265c6bd6f6fd23c589a86c8a7e42c4b7d4a1e4bcd5737773ac10f/68747470733a2f2f706f7365722e707567782e6f72672f6e696c706f727475677565732f68616c6a736f6e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/nilportugues/haljson-bundle)[![License](https://camo.githubusercontent.com/7206295c6db91cbbf6efa1b42b425b1dd055c2d7ebdb0f3104d8448165d94630/68747470733a2f2f706f7365722e707567782e6f72672f6e696c706f727475677565732f68616c6a736f6e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/nilportugues/haljson-bundle)[![Donate](https://camo.githubusercontent.com/7b6de155df30b37b25eb5fec52f9213680c3dbf067dfb7d7e2850ac4096c7d05/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e6174655f534d2e676966)](https://paypal.me/nilportugues)

- [Installation](#installation)
- [Usage](#usage)
    - [Creating the mappings](#creating-the-mappings)
- [Outputing API Responses](#outputing-api-responses)
    - [HAL+JSON Responses](#response-objects-haljsonresponsetrait)
- [Integration with NelmioApiDocBundleBundle](#integration-with-nelmioapidocbundlebundle)
- [Quality](#quality)
- [Contribute](#contribute)
- [Support](#support)
- [Authors](#authors)
- [License](#license)

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

[](#installation)

**Step 1: Download the Bundle**

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require nilportugues/haljson-bundle
```

**Step 2: Enable the Bundle**

Then, enable the bundle by adding it to the list of registered bundles in the `app/AppKernel.php` file of your project:

```
