miniframe / sentry-bundle
Addon for using Sentry logging in the Miniframe PHP Framework.
Requires
- php: >=7.3
- miniframe/core: ^1.0
- sentry/sdk: ^3.1
Requires (Dev)
- phpunit/phpunit: ^9.4
- squizlabs/php_codesniffer: ^3.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This library adds Sentry support to the Miniframe PHP Framework.
How to use
- In your existing project, type:
composer require miniframe/sentry-bundle - 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.
Docker shortcuts
In the bin folder, a few batch files and shell scripts exist, to make development easier.
If you install Docker Desktop for Windows or Docker on Linux,
you can use the scripts in bin (for example bin\composer.bat for Windows or bin/composer.sh for Linux)
to run Bash, Composer, CodeSniffer, PHPUnit, PHPStan and 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.