uma / api-problem-bundle
Integration between crell/api-problem and the Symfony framework
Installs: 555
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5.9
- crell/api-problem: ^2.0
- symfony/config: ^2.7|^3.0
- symfony/dependency-injection: ^2.7|^3.0
- symfony/http-kernel: ^2.7|^3.0
Requires (Dev)
- symfony/browser-kit: ^2.7|^3.0
- symfony/framework-bundle: ^2.7|^3.0
This package is auto-updated.
Last update: 2024-02-27 23:59:06 UTC
README
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