Zend Expressive ErrorHandler able to send error to

v1.0.0 2019-08-20 07:24 UTC

This package is auto-updated.

Last update: 2024-04-21 01:13:28 UTC


Latest Stable Version Total Downloads Monthly Downloads Software License

This library enables Zend Expressive to send errors and exceptions to


composer require geo6/zend-expressive-sentry


Create a file in your config directory with your correct DSN (and options, if necessary):



return [
    'sentry' => [
        'dsn' => '',


To enable it, you just have to add Geo6\Expressive\Sentry\ConfigProvider::class to your main configuration (usually config/config.php):


$aggregator = new ConfigAggregator([
+     Geo6\Expressive\Sentry\ConfigProvider::class,
], $cacheConfig['config_cache_path']);


The Sentry ErrorHandler will be active only in "production mode" (when $config['debug] is false).
To switch to "production mode", you can use composer run development-disable.

This library was inspired by stickeeuk/zend-expressive-sentry.
The main difference is that this library uses the last version of the PHP SDK.