Releases: hugomyb/filament-error-mailer
Smart Error Detection & Beautiful UI
Release v5.1.0.0 - Smart Error Detection & Beautiful UI
✨ Compatible with Filament v3, v4, and v5
⚠️ Important: Migration from v3.x
If you're upgrading from v3.x, you need to update your composer.json constraint:
Before:
{
"require": {
"hugomyb/filament-error-mailer": "^3.1"
}
}After:
{
"require": {
"hugomyb/filament-error-mailer": "^5.1"
}
}Then run:
composer update hugomyb/filament-error-mailer
Why the version jump from v3 to v5?
The package version now aligns with Filament v5 support. There are no breaking changes - the package works exactly the same way with Filament v3, v4, and v5. Only the version number changed.
What if I don't update?
If you keep "^3.1" in your composer.json, you'll stay on v3.2.0.3 and won't receive this update with the new features.
What's new
🎯 Smart Application File Detection
The package now automatically identifies the first line of code from your application (excluding vendor files) in the stack trace. This makes debugging significantly faster by showing you exactly where in your code the error originated.
Before:
File: /vendor/laravel/framework/src/Illuminate/Database/Connection.php
Line: 742
Now:
Application File: /app/Http/Controllers/UserController.php ← Your code!
Application Line: 25 ← Your code!
Origin File: /vendor/laravel/framework/src/Illuminate/Database/Connection.php
Origin Line: 742
🌓 Beautiful Error Details Page
The error details page has been completely redesigned with modern UI and powerful features:
- Dark/Light Mode Toggle - Switch themes with persistent preference (saved in localStorage)
- Copy as Markdown - Copy formatted error details for documentation
- Copy as JSON - Copy raw error data for processing
- Share Functionality - Use native Web Share API (mobile-friendly) with fallback
- Responsive Design - Works perfectly on all devices
- Smooth Transitions - Beautiful animations between theme changes
📊 Enhanced Error Information
Error notifications now include both:
- Application File/Line - Where in your code the error occurred
- Origin File/Line - Where the exception was originally thrown
This dual information helps you understand both the root cause and the impact point.
🔄 Migration Guide
No Breaking Changes! 🎉
This release is 100% backward compatible. No changes to your existing configuration are required.
Optional: Republish Views (if customized)
If you previously published and customized the error details view, you may want to republish to get the new features:
php artisan vendor:publish --tag="error-mailer-views" --forceUpdate Your Package
composer update hugomyb/filament-error-mailer
That's it! The new features will work automatically.
📝 Full Changelog
Added
- Smart Application File Detection: Automatically identifies the first line of code from your application (excluding vendor files)
- New
appFileandappLinefields in error details - Helps developers quickly locate errors in their own code
- New
- Beautiful Error Details Page with modern UI:
- Dark/Light mode toggle with persistent preference
- Copy error details as Markdown format
- Copy error details as JSON format
- Share functionality using Web Share API
- Responsive design with smooth transitions
- Enhanced Error Information Display:
- Shows both application file (your code) and origin file (where exception was thrown)
- Improved visual hierarchy with color-coded sections
- Better mobile experience
Changed
- Error details page now uses simple HTML view for better performance
- Improved authentication flow with proper redirect after login
- Updated README with comprehensive documentation
Fixed
- Share button now correctly displays feedback on the Share button (not Copy button)
- Copy functionality now works on all browsers using
document.execCommandfallback - Dropdown menu closes properly after selection
🔄 Configuration Changes
No Breaking Changes Required
This release is 100% backward compatible. However, if you want to take advantage of error filtering features, you can update your config/error-mailer.php:
Add this section to your config file:
/*
|--------------------------------------------------------------------------
| Error Filtering
|--------------------------------------------------------------------------
|
| Configure which errors should be ignored.
|
*/
'ignore' => [
'levels' => [
// 'debug',
// 'info',
// 'notice',
// 'warning',
],
'exceptions' => [
// \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
// \Illuminate\Validation\ValidationException::class,
],
],Or simply republish the config:
php artisan vendor:publish --tag="error-mailer-config" --force
What This Enables
With error filtering configured, you can:
- Ignore specific log levels: Don't get notified for debug or info level logs
- Ignore specific exceptions: Skip notifications for 404 errors, validation errors, etc.
Example configuration:
'ignore' => [
'levels' => [
'debug',
'info',
],
'exceptions' => [
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
\Illuminate\Validation\ValidationException::class,
\Illuminate\Auth\AuthenticationException::class,
],
],This prevents notification spam from common, non-critical errors while still alerting you to serious issues.
v5.0.0.0
v4.0.0.2
What's Changed
- feat: add copy error button with multiple export formats by @maximemolivier in #5
New Contributors
- @maximemolivier made their first contribution in #5
Full Changelog: v4.0.0.1...v4.0.0.2
v4.0.0.1
v4.0.0.0 - Filament V4 Support
What's Changed
- Filament V4 Support by @agencetwogether in #3
New Contributors
- @agencetwogether made their first contribution in #3
Full Changelog: v3.2.0.3...v4.0.0.0
v3.2.0.3
v3.2.0.2
Release v3.2.0.2 - Reintroduced Notification Cooldown 🚀
This release reintroduces the cacheCooldown feature to limit duplicate error notifications when using JSON storage.
🛠️ Fixes and Improvements
- Added support for
cacheCooldownto prevent repeated notifications within a specified time frame. - Each error file now includes a
last_notified_attimestamp to manage notification cooldown. - Ensures consistent behavior for email and webhook notifications.
v3.2.0.1
Release v3.2.0.1 - Persistent Error Storage 🚀
Introducing significant improvements in error storage and route handling for seamless debugging and error management.
✨ What's New
🔧 Persistent Error Storage in JSON
- Errors are now stored as JSON files in the
storage/app/errorsdirectory.- Each error is saved with a unique hash for easy retrieval.
- Errors persist indefinitely, ensuring they remain accessible for long-term debugging.
- Automatically creates the directory if it doesn't exist.
🛠️ Route Handling Improvements
- The
/error-mailer/{errorHash}route now takes priority over Filament resource routes.- Prevents conflicts with automatically generated Filament routes.
- Ensures that custom error detail pages are resolved correctly.
🖥️ Enhanced Error Details Retrieval
- Error details are now fetched from JSON files for the error details page.
- Displays full error context, request information, and stack trace.
- Returns a 404 response if the requested error file does not exist.
⚙️ Configuration Enhancements
- Added
storage_pathconfiguration option to define the location for JSON error files:
'storage_path' => storage_path('app/errors'),🛠️ Upgrade Notes
To upgrade to v3.2.0.1, follow these steps:
- Update the package via Composer:
composer update hugomyb/filament-error-mailer- Add the storage_path key to your config/error-mailer.php:
'storage_path' => storage_path('app/errors'),- Ensure the storage/app/errors directory is writable by your application.
🛡️ Suggested Maintenance
To prevent the JSON storage from becoming overloaded, we recommend adding a scheduled task to clean up old error files.
Example:
$schedule->call(function () {
$storagePath = config('error-mailer.storage_path');
$files = File::files($storagePath);
foreach ($files as $file) {
if ($file->getMTime() < now()->subMonths(3)->timestamp) {
File::delete($file->getRealPath());
}
}
})->daily();v3.2.0.0
Release v3.2.0.0 - Comprehensive Error Monitoring 🚨
This version introduces powerful new features and enhancements to streamline error monitoring and provide deeper insights into your application's errors.
✨ New Features
🔗 Discord Webhook Integration
- Real-time Error Notifications: Send error alerts directly to a Discord channel.
- Details Included:
- Error message, file, and line number.
- Clickable link to view full error details in your application.
🖥️ Error Details Page
- A dedicated page for every error, accessible via a unique URL.
- Includes:
- Full error context: message, file, line number.
- Request details: method, IP, user agent, referrer, time, URI.
- Full stack trace for debugging.
- Authenticated user information (if available).
- Modern and responsive design for easy readability.
📧 Enhanced Email Notifications
- New "View Error Details" Button: Email notifications now include a button linking directly to the error details page.
- URL Displayed: The error details URL is also shown in plain text for manual copying.
⚙️ Configuration Enhancements
- Added support for Discord webhook URLs:
- Set via
ERROR_MAILER_DISCORD_WEBHOOKin your.envfile.
- Set via
- New webhook-related options in the config file:
- Customize Discord notifications (title, description, fields).
- Improved error notification cooldown (
cacheCooldown) to prevent spamming.
📖 Documentation Updates
- Expanded README with:
- Instructions for setting up Discord webhook integration.
- Details on the error details page.
- Updated configuration examples and usage guidelines.
🚀 Upgrade Notes
To upgrade to v2.0.0, follow these steps:
- Update the package via Composer:
composer update hugomyb/filament-error-mailer- Add the following configuration block to your config/error-mailer.php file:
'webhooks' => [
'discord' => env('ERROR_MAILER_DISCORD_WEBHOOK'),
'message' => [
'title' => 'Error Alert - ' . env('APP_NAME'),
'description' => 'An error has occured in the application.',
'error' => 'Error',
'file' => 'File',
'line' => 'Line',
'details_link' => 'View more details',
],
],- If you want to use Discord webhooks, add the following variable to your .env file:
ERROR_MAILER_DISCORD_WEBHOOK="https://discord.com/api/webhooks/your-webhook-id/your-webhook-token"🛠️ Bug Fixes and Improvements
- Fixed various minor bugs and improved error notification reliability.
- Enhanced UI/UX for the error details page.
This release brings Filament Error Mailer to the next level, providing a comprehensive error monitoring solution with multi-channel notifications and deep diagnostics.
Thank you for your support and feedback! 🚀
v3.1.2.1
Full Changelog: v3.1.2.0...v3.1.2.1