PHPackages                             v-six/silex-raven - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. v-six/silex-raven

ActiveLibrary

v-six/silex-raven
=================

A Silex Service Provider for Raven

0.1.2(12y ago)17.5kMITPHPPHP &gt;=5.3.0

Since Apr 8Pushed 12y ago1 watchersCompare

[ Source](https://github.com/v-six/silex-raven)[ Packagist](https://packagist.org/packages/v-six/silex-raven)[ Docs](https://github.com/v-six/silex-raven)[ RSS](/packages/v-six-silex-raven/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

silex-raven
===========

[](#silex-raven)

A basic [Silex](https://github.com/silexphp/Silex) service provider for PHP client for [Sentry](https://getsentry.com/welcome/) : [getsentry/raven-php](https://github.com/getsentry/raven-php).

Installation
============

[](#installation)

The recommended way to install silex-raven is through [Composer](https://getcomposer.org). Just create a composer.json file and run the php composer.phar install command to install it:

```
{
    "require": {
        "v-six/silex-raven": "0.1.*"
    }
}
```

Alternatively, you can download the silex-raven.zip file and extract it.

Usage
=====

[](#usage)

```
$app->register(new SilexRaven\RavenServiceProvider(),
    array(
        'raven.dsn' => 'http://public:secret@example.com/1',
        'raven.options' => array(
            'logger' => 'my-logger-name' // Set custom logger name
        )
        'raven.handle' => array(
            'exceptions' => false, // Disable exceptions handler
            'errors' => true, // Enable errors handler
            'fatal_errors' => true, // Enable fatal_errors handler
        )
    )
);
```

If necessary, set your own options in `raven.options` (see [Raven documentation](https://github.com/getsentry/raven-php#configuration)). All handlers are registered by default, you can disable them by setting corresponding configuration input to false in `raven.handle`.

Custom
------

[](#custom)

You can easily capture an error or an exception with the following :

```
// Capture an error
$app['raven']->captureMessage('Oops !');

// Capture an exception
$app['raven']->captureException(new \Exception('Oops !'));

// Capture an exception with additional debug data
$app['raven']->captureException(new \Exception('Oops !'),
    array(
        'extra' => array(
            'php_version' => phpversion()
        ),
    )
);
```

Obviously you can also provide custom request context :

```
// Bind the logged in user
$app['raven']->user_context(array('email' => 'foo@example.com'));

// Tag the request with something interesting
$app['raven']->tags_context(array('interesting' => 'yes'));

// Provide a bit of additional context
$app['raven']->extra_context(array('happiness' => 'very'));

// Clean all previously provided context
$app['raven']->context->clear();
```

Example
-------

[](#example)

Here is a full example coupled with [Silex](https://github.com/silexphp/Silex) error handler (see [Silex error handlers documentation](http://silex.sensiolabs.org/doc/usage.html#error-handlers)) :

```
$app = new Silex\Application();
$app->register(
    new \SilexRaven\RavenServiceProvider(),
    ['raven.dsn' => 'http://public:secret@example.com/1']
);

$app->error(function (\Exception $e, $code) use($app, $user) {
    $app['raven']->user_context(array('email' => $user->email));
    $app['raven']->captureException($e)
    $app['raven']->context->clear();

    return new Response("There is an error !");
});
```

Resources
=========

[](#resources)

- [Silex error handlers documentation](http://silex.sensiolabs.org/doc/usage.html#error-handlers)
- [Raven documentation](https://github.com/getsentry/raven-php)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

4410d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3.3

0.1.2PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ddd8b9db3e594ed5729b7610aa5c3b77f726d5a1ce779b95f809c9ebb32b446?d=identicon)[v-six](/maintainers/v-six)

---

Top Contributors

[![v-six](https://avatars.githubusercontent.com/u/3017033?v=4)](https://github.com/v-six "v-six (18 commits)")

---

Tags

errorsentrysilexravenraven-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/v-six-silex-raven/health.svg)

```
[![Health](https://phpackages.com/badges/v-six-silex-raven/health.svg)](https://phpackages.com/packages/v-six-silex-raven)
```

###  Alternatives

[jenssegers/raven

Sentry (Raven) error monitoring integration for Laravel projects

92197.2k1](/packages/jenssegers-raven)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)[moriony/silex-sentry-provider

Sentry service provider for the Silex framwork.

1073.5k1](/packages/moriony-silex-sentry-provider)[rcrowe/raven

Raven client for Sentry that supports background processing through multiple providers.

3467.0k](/packages/rcrowe-raven)[oneup/contao-sentry-bundle

This bundle provides an easy integration of sentry.io for Contao 4.4.x and newer.

1114.8k](/packages/oneup-contao-sentry-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
