uma/api-problem-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Integration between crell/api-problem and the Symfony framework

v0.1.0 2016-11-19 00:07 UTC

This package is auto-updated.

Last update: 2024-02-27 23:59:06 UTC


README

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

Clean integration between the crell/api-problem library and the Symfony framework

What it does

This bundle just hooks a simple VIEW event listener into the request lifecycle. This allows you to return ApiProblem objects from your controllers without needing to concern yourself about how to transform them into Symfony responses.

Installation & Configuration

Add uma/api-problem-bundle to your composer.json file:

php composer.phar require "uma/api-problem-bundle"

And register the bundle in app/AppKernel.php:

public function registerBundles()
{
    return [
        // ...
        new UMA\ApiProblemBundle\UMAApiProblemBundle(),
    ];
}

Usage

Take a look at the TestController class for a hands-on example.

TODO

  • XML support