codekandis / tiphy-sentry-client-integration
`codekandis/tiphy-sentry-client-integration` 是一个库,用于将 `codekandis/sentry-client` 集成到 `codekandis/tiphy`。
0.10.0
2022-07-20 18:43 UTC
Requires
- php: ^7.4
- codekandis/configurations: ^0
- codekandis/sentry-client: ^1
- codekandis/tiphy: ^0
Requires (Dev)
- codekandis/phpunit: ^3
- roave/security-advisories: dev-master
README
codekandis/tiphy-sentry-client-integration
是一个库,用于将 codekandis/sentry-client
集成到 codekandis/tiphy
。
索引
安装
使用以下命令安装最新版本
$ composer require codekandis/tiphy-sentry-client-integration
如何使用
创建一个配置
只需将 InternalServerErrorThrowableHandler
注入到 ActionDispatcher
中。
<?php declare( strict_types = 1 ); namespace Vendor\Project; use CodeKandis\SentryClient\SentryClient; use CodeKandis\Tiphy\Actions\ActionDispatcher; use CodeKandis\TiphySentryClientIntegration\Throwables\Handlers\InternalServerErrorThrowableHandler; use CodeKandis\TiphySentryClientIntegration\Throwables\SentryClientConfiguration; $routesConfiguration = /** ... */; $preDispatcher = /** ... */; $throwableHandler = new InternalServerErrorThrowableHandler( new SentryClient( new SentryClientConfiguration( [ /** ... */ ] ) ) ); ( new ActionDispatcher( $routesConfiguration, $preDispatcher, $throwableHandler ) ) ->dispatch();