Download the PHP package error-explorer/laravel-error-reporter without Composer
On this page you can find all versions of the php package error-explorer/laravel-error-reporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download error-explorer/laravel-error-reporter
More information about error-explorer/laravel-error-reporter
Files in error-explorer/laravel-error-reporter
Package laravel-error-reporter
Short Description Error reporting package for Laravel applications - automatically sends errors to Error Explorer monitoring platform
License MIT
Informations about the package laravel-error-reporter
Error Reporter Package for Laravel
A Laravel package that automatically captures and reports exceptions to your Error Explorer monitoring platform.
Features
- 🚀 Automatic Exception Capture: Listens to all unhandled exceptions in your Laravel application
- 🔧 Zero Configuration: Works out of the box with minimal setup
- 🛡️ Secure: Sanitizes sensitive data (passwords, tokens, etc.) before sending
- ⚡ Non-blocking: Asynchronous error reporting doesn't slow down your application
- 🎯 Smart Filtering: Configurable exception filtering to ignore common framework exceptions
- 📊 Rich Context: Captures request data, server info, stack traces, and more
- 🔄 Wide Compatibility: Supports Laravel 8+ and PHP 7.4+ for maximum compatibility
Installation
Step 1: Install the Package
Step 2: Publish Configuration (Optional)
The package works out of the box, but you can optionally publish the configuration file:
Step 3: Configure Environment Variables
Add these variables to your .env
file:
Configuration Options
Option | Type | Required | Description |
---|---|---|---|
ERROR_WEBHOOK_URL |
string | Yes | The base URL of your Error Explorer instance |
ERROR_WEBHOOK_TOKEN |
string | Yes | Unique project token from Error Explorer |
ERROR_PROJECT_NAME |
string | No | Name identifier for your project (defaults to APP_NAME ) |
ERROR_REPORTING_ENABLED |
boolean | No | Enable/disable error reporting (default: true) |
Default Ignored Exceptions
By default, these common Laravel exceptions are ignored:
Illuminate\Auth\AuthenticationException
Illuminate\Auth\Access\AuthorizationException
Illuminate\Database\Eloquent\ModelNotFoundException
Illuminate\Http\Exceptions\HttpResponseException
Illuminate\Http\Exceptions\ThrottleRequestsException
Illuminate\Session\TokenMismatchException
Illuminate\Validation\ValidationException
Symfony\Component\HttpKernel\Exception\HttpException
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
You can override this list in the published configuration file.
Usage
Automatic Error Reporting
Once configured, the package automatically captures and reports:
- All unhandled exceptions
- HTTP errors (4xx, 5xx)
- Fatal errors and exceptions
Manual Error Reporting
Option 1: Using the Facade (Recommended)
Option 2: Using the Static Class
Option 3: Service Injection
Quick Helpers
Custom Messages & Events
Report Custom Messages
Report important events or custom messages without exceptions:
Track Error Context with Breadcrumbs
Add breadcrumbs to track what led to an error. Best Practice: Only log critical steps that might fail, error conditions, or context needed for debugging - avoid logging successful operations:
💡 When to use breadcrumbs:
- Before critical operations that might fail
- When errors or warnings occur
- For navigation paths leading to errors
- To track slow or problematic operations
When NOT to use:
- Successful operations
- Normal business flow that works fine
- Too granular steps that add noise
Real-World Example
Data Captured
The package captures comprehensive error context:
Exception Data
- Exception message and class
- Stack trace
- File and line number
- HTTP status code (when applicable)
Request Context
- URL and HTTP method
- Route name
- Client IP and User-Agent
- Request parameters (sanitized)
- Query parameters (sanitized)
- Headers (sensitive ones redacted)
Server Context
- PHP version
- Laravel version
- Memory usage (current and peak)
- Environment (local/staging/production)
- Timestamp
Breadcrumbs & User Journey
- User actions and navigation
- HTTP requests and responses
- Database queries with timing
- Custom events and markers
- Automatic chronological ordering
- Maximum 50 breadcrumbs (configurable)
Security Features
Sensitive data is automatically sanitized:
- Parameters: password, token, secret, key, api_key, authorization, password_confirmation
- Headers: authorization, cookie, x-api-key, x-auth-token
Sensitive values are replaced with [REDACTED]
.
Error Fingerprinting
Errors are automatically grouped using a fingerprint based on:
- Exception class
- File path
- Line number
This allows Error Explorer to group similar errors together.
Compatibility
PHP & Laravel Support
Component | Minimum Version | Recommended |
---|---|---|
PHP | 7.4+ | 8.1+ |
Laravel | 8.0+ | 10.0+ |
Supported Laravel Versions
- ✅ Laravel 8.x
- ✅ Laravel 9.x
- ✅ Laravel 10.x
- ✅ Laravel 11.x
Compatibility Matrix
PHP Version | Laravel 8.x | Laravel 9.x | Laravel 10.x | Laravel 11.x |
---|---|---|---|---|
7.4 | ✅ | ❌ | ❌ | ❌ |
8.0 | ✅ | ✅ | ❌ | ❌ |
8.1 | ✅ | ✅ | ✅ | ❌ |
8.2 | ✅ | ✅ | ✅ | ✅ |
8.3+ | ✅ | ✅ | ✅ | ✅ |
The package automatically adapts to your PHP and Laravel version for maximum compatibility.
Development vs Production
Development Environment
Production Environment
Troubleshooting
Package Not Capturing Errors
- Check that
ERROR_REPORTING_ENABLED=true
- Verify your webhook URL and token are correct
- Check Laravel logs for any HTTP client errors
- Ensure the exception is not in the ignored list
HTTP Client Errors
The package silently fails if the webhook is unreachable. Check your logs:
Testing the Integration
Create a test route to verify the integration:
Service Provider Issues
If the service provider is not auto-discovered, manually register it in config/app.php
:
Advanced Configuration
Custom Exception Handler
If you have a custom exception handler, you can manually integrate Error Explorer:
Custom Ignored Exceptions
Customize which exceptions to ignore:
Performance Considerations
- Error reporting is asynchronous and doesn't block your application
- HTTP timeout is set to 5 seconds by default
- Breadcrumbs are stored in memory (cleared after each request)
- Sensitive data sanitization has minimal performance impact
License
MIT License
Support
For issues and questions:
- Check the Error Explorer documentation
- Review this README
- Check your Error Explorer dashboard for received errors
- Verify your configuration and environment variables
All versions of laravel-error-reporter with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/config Version ^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0