Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 2.28 KB

README.md

File metadata and controls

64 lines (47 loc) · 2.28 KB

codekandis/tiphy-sentry-client-integration

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