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

This package is auto-updated.

Last update: 2024-04-20 22:51:58 UTC


README

Version License Minimum PHP Version Code Coverage

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();