codekandis/tiphy-sentry-client-integration
is a library to integrate codekandis/sentry-client
into codekandis/tiphy
.
Install the latest version with
$ composer require codekandis/tiphy-sentry-client-integration
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();