elife / api-problem
eLife Sciences RFC 7807处理器
1.2.0
2024-05-27 09:16 UTC
Requires
- php: >=7.0
- crell/api-problem: ^3.6
- symfony/http-foundation: >=2.8.52 || ^4.0
Requires (Dev)
- guzzlehttp/psr7: ^1.0
- phpunit/phpunit: ^5.7.7 || ^6.0
- pimple/pimple: ^3.0
- silex/silex: ^2.0
- squizlabs/php_codesniffer: ^3.10
- symfony/browser-kit: ^2.7 || ^3.0
- symfony/http-kernel: ^2.7 || ^3.0
Suggests
- silex/silex: ^2.0, to use ApiProblemProvider
Conflicts
- sebastian/comparator: <1.2.3
This package is auto-updated.
Last update: 2024-08-27 09:50:01 UTC
README
此库为eLife Sciences应用程序提供RFC 7807处理器。
依赖关系
- Composer
- PHP 7
安装
composer require elife/api-problem
设置
Silex
use eLife\ApiProblem\Silex\ApiProblemProvider; $app->register(new ApiProblemProvider());
异常详细信息(例如堆栈跟踪)将根据 $app['debug']
的值包含在内。这可以通过将 $app['api_problem.factory.include_exception_details']
设置为 true
或 false
来覆盖。
运行测试
vendor/bin/phpunit