talentrydev / error-handling-bundle
将PHP错误转换为异常的Symfony包
4.0.0
2024-06-14 14:45 UTC
Requires
- php: ^8.3
- symfony/console: ^6.3
- symfony/framework-bundle: ^6.3
- symfony/http-kernel: ^6.3
- symfony/yaml: ^6.3
- talentrydev/error-handling: ^3.0.0
Requires (Dev)
- phpunit/phpunit: ^11
- squizlabs/php_codesniffer: ^3.7
README
此Symfony包封装了错误处理库。与Symfony 3和4版本兼容。
安装和配置symfony包
- 运行
composer require talentrydev/error-handling-bundle
- 将ErrorHandlingBundle添加到内核的
registerBundles方法中
return [
//...
new \Talentry\ErrorHandlingBundle\ErrorHandlingBundle();
];
- 配置包以在kernel.request和console.command事件上自动启动错误处理
error_handling:
auto_start: true