codekandis / tiphy-sentry-client-integration
`codekandis/tiphy-sentry-client-integration` is a library to integrate `codekandis/sentry-client` into `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
is a library to integrate codekandis/sentry-client
into codekandis/tiphy
.
Index
Installation
Install the latest version with
$ composer require codekandis/tiphy-sentry-client-integration
How to use
Create a configuration
Just inject the InternalServerErrorThrowableHandler
into the 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();