AppKernel, services.yml, Monolog integration), making it a direct fit for Symfony-based applications. For Laravel or non-Symfony PHP projects, this package is non-applicable without significant refactoring.environment and appVersion (via Airbrake’s context variables), which are useful for Laravel’s deployment tracking but require manual mapping to Laravel’s environment variables (e.g., APP_ENV, APP_VERSION).App\Exceptions\Handler) would need to forward errors to the bundle’s service.parameters.yml with Laravel’s .env or config/airbrake.php.report() in Handler).Why Not Use a Laravel-Native Package?
spatie/laravel-airbrake or sentry/sentry-laravel are actively maintained and Laravel-optimized.Symfony Migration Path
Performance Impact
Security
.env is more secure than Symfony’s parameters.yml for secrets. Would this require additional safeguards?Testing
AirbrakeHandler.App\Exceptions\Handler to forward uncaught exceptions to the bundle’s service.config/airbrake.php and .env for secrets.Phase 1: Proof of Concept
AirbrakeClient.throw new Exception().WARNING → Airbrake).Phase 2: Full Integration
Handler::report() with a hybrid that uses the bundle for Airbrake + native Laravel logging.request()->ip(), auth()->user())..env-based configuration.Phase 3: Advanced Features
debugbar).php artisan airbrake:notify).symfony/* conflicts).Handler::report() to include Airbrake.appVersion maps to Laravel’s APP_VERSION).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bundle API key/project ID invalid | Errors logged locally but not sent to Airbrake. | Validate config in CI/CD; use .env validation. |
| Airbrake API downtime | Errors silently dropped. | Implement fallback logging (e.g., to Sentry or a file). |
| Monolog handler misconfiguration | Logs not forwarded to Airbrake. | Test with monolog.logger.airbrake channel. |
| Symfony dependency conflicts | Laravel app fails to boot. | Use replace in composer.json or vendor patching. |
| Laravel exception format mismatch | Airbrake receives malformed error data. | Normalize exceptions in Handler::report(). |
| Fork abandonment | No updates for Laravel-specific fixes. | Maintain a private fork or switch to a Laravel-native package. |
AppKernel vs. Laravel’s service container.How can I help you explore Laravel packages today?