libero / api-problem-bundle
Implements the Libero API error standard
Installs: 1 721
Dependents: 1
Suggesters: 1
Security: 0
Stars: 0
Watchers: 4
Forks: 2
Type:symfony-bundle
Requires
- php: ^7.2
- fluentdom/fluentdom: ^7.0
- psr/log: ^1.0
- symfony/config: ^3.4 || ^4.0
- symfony/dependency-injection: ^3.4 || ^4.0
- symfony/event-dispatcher: ^3.4 || ^4.0
- symfony/http-foundation: ^3.4 || ^4.0
- symfony/http-kernel: ^3.4 || ^4.0
Requires (Dev)
- libero/coding-standard: ^0.3
- phpstan/phpstan: ^0.10
- phpstan/phpstan-phpunit: ^0.10
- phpunit/phpunit: ^7.2
- symfony/debug: ^3.4 || ^4.0
- symfony/framework-bundle: ^3.4 || ^4.0
- symfony/routing: ^3.4 || ^4.0
This package is auto-updated.
Last update: 2020-01-20 13:20:52 UTC
README
This is a Symfony bundle implements the Libero API error standard (based on Problem Details for HTTP APIs).
Getting started
Using Composer you can add the bundle as a dependency:
composer require libero/api-problem-bundle
If you're not using Symfony Flex, you'll need to enable the bundle in your application.
All exceptions are caught and turned into a application/problem+xml
response.
To modify the contents of the response, you can listen for the libero.api_problem.create
event.
Any remaining exceptions will be caught; unless the exception is an instance of Symfony's HttpExceptionInterface
, the response will be 500 Internal Server Error
.
Getting help
- Report a bug or request a feature on GitHub.
- Ask a question on the Libero Community Slack.
- Read the code of conduct.