miniframe/sentry-bundle

Addon for using Sentry logging in the Miniframe PHP Framework.

v1.1.0 2022-07-20 20:21 UTC

This package is auto-updated.

Last update: 2024-10-26 00:01:25 UTC


README

This library adds Sentry support to the Miniframe PHP Framework.

build code coverage

How to use

  1. In your existing project, type: composer require miniframe/sentry-bundle
  2. Add the directive below to your config.ini

Example config.ini directives

[framework]
middleware[sentry] = Miniframe\Middleware\Sentry

[sentry]
dsn = https://******************@******.ingest.sentry.io/******
exclude[] = Miniframe\Response\NotFoundResponse

Add the Middleware as high as possible in the Middleware list, so it's loaded before other middlewares get the chance of throwing errors.

You can add a list of error classes that shouldn't be logged, to save on API calls to Sentry.

For Windows Developers

In the bin folder, a few batch files exist, to make development easier.

If you install Docker Desktop for Windows, you can use bin\composer.bat, bin\phpcs.bat, bin\phpunit.bat, bin\phpstan.bat and bin\security-checker.bat as shortcuts for Composer, CodeSniffer, PHPUnit, PHPStan and the Security Checker, without the need of installing PHP and other dependencies on your machine.

The same Docker container and tools are used in Bitbucket Pipelines to automatically test this project.