elife/api-problem

eLife Sciences RFC 7807 handler

1.2.0 2024-05-27 09:16 UTC

This package is auto-updated.

Last update: 2024-06-27 09:26:59 UTC


README

eLife API Problem PHP

Build Status

This library provides a RFC 7807 handler for the eLife Sciences applications.

Dependencies

Installation

composer require elife/api-problem

Set up

Silex

use eLife\ApiProblem\Silex\ApiProblemProvider;

$app->register(new ApiProblemProvider());

Exception details (eg stacktrace) will be included based on the value of $app['debug']. This can be overridden by setting $app['api_problem.factory.include_exception_details'] to true or false.

Running the tests

vendor/bin/phpunit