- How do I install jenssegers/raven in a Laravel app?
- Run composer require jenssegers/raven. In config/app.php, add Jenssegers\Raven\RavenServiceProvider to the providers array and 'Raven' => Jenssegers\Raven\Facades\Raven to the aliases array, because the package does not support auto-discovery. Publish the config with php artisan vendor:publish --provider="Jenssegers\Raven\RavenServiceProvider" and set your SENTRY_DSN.
- Which Laravel and PHP versions does jenssegers/raven support?
- It targets Laravel 4.2 through 5.x on PHP 5.6 to 7.x. Laravel 6 and newer, and PHP 8.1 and newer, are outside the supported window, so it will not work on Laravel 8, 9, 10 or 11. Check the package's composer.json constraints before installing in an existing app.
- How do I configure the Sentry DSN for jenssegers/raven?
- Publish the package config and set the dsn value, typically 'dsn' => env('SENTRY_DSN'), then define SENTRY_DSN in your .env file. The bundled service provider passes this to the underlying Raven client. You may also want to set the environment option so events are tagged with the correct environment in Sentry.
- How does jenssegers/raven automatically report uncaught exceptions?
- The service provider hooks into Laravel's exception handler so uncaught exceptions are sent to Sentry with the stack trace and request context. You do not need to wrap controller code in try/catch to get basic reporting. You can also report handled exceptions manually through the Raven facade.
- Can I send Laravel log messages to Sentry with the Monolog handler?
- Yes, the package ships a Monolog handler that converts log records into Sentry events. Register it on the Monolog logger, or in Laravel's logging configuration for later 5.x apps, so warnings, errors and criticals reach Sentry. Set the handler level if you do not want every log record shipped.
- Is jenssegers/raven still maintained, or should I use sentry/sentry-laravel?
- It is effectively unmaintained: the upstream Raven PHP SDK is deprecated and the package's recent changelog has mainly widened Laravel version constraints rather than added features. For any current project, use the official sentry/sentry-laravel package instead. Treat existing jenssegers/raven usage as technical debt with a migration ticket and an owner.
- Does jenssegers/raven work with Laravel Octane or queue workers?
- No. The legacy Raven client and this adapter predate Laravel Octane and modern long-lived worker lifecycle handling, so events may not be flushed reliably in persistent processes. If you run Octane or long-running queue workers, use sentry/sentry-laravel, which handles flushing and context reset per request or job.
- How do I set user context and breadcrumbs in Sentry with jenssegers/raven?
- The Raven facade proxies to the underlying Raven client, so you can attach user context, tags, extra data and breadcrumbs that will be included with later exceptions. Populate them early in the request, for example in middleware after authentication. Keep payloads small and avoid sensitive personal data, because the legacy client has limited PII scrubbing.
- Is jenssegers/raven safe for production in a new Laravel project?
- For new projects, no. It depends on the abandoned raven/raven SDK, sits directly on the critical exception path, and lacks modern Sentry features such as tracing, release health and current PII scrubbing. On PHP 8.1+ you should also expect deprecation noise and possible fatals inside the error path itself. Use sentry/sentry-laravel instead.
- How do I test that jenssegers/raven is sending events to Sentry?
- Configure a staging DSN, trigger an exception or capture a message through the Raven facade, and confirm the event appears in your Sentry project. For automated tests, point SENTRY_DSN at a separate test project or disable reporting so local runs do not create noise. Also check that the Monolog handler level allows the records you expect to send.