filament/upgrade
Automate Filament upgrades in your Laravel app. Guides you through version changes, checks dependencies, and applies recommended updates so you can move between Filament releases faster with fewer manual steps.
filament/upgrade package is highly specialized for migrating Filament v4 applications to v5, addressing breaking changes, API shifts, and deprecations. It fits only in contexts where:
Resources, Pages, Widgets, Notifications).php artisan filament:upgrade.Filament\Tables → Filament\Resources\Table).config/filament.php).@filamentTables → @filamentResources).filament_users) may need updates post-upgrade.| Risk Area | Severity | Mitigation |
|---|---|---|
| Breaking Changes | High | Run filament:upgrade --dry-run first; test in staging. |
| Custom Plugin Compatibility | Medium | Document unsupported plugins; patch or replace them pre-upgrade. |
| Third-Party Package Conflicts | Medium | Audit composer.json for Filament v4-specific packages (e.g., spatie/laravel-filament-spa). |
| Performance Regression | Low | Benchmark post-upgrade; Filament v5 is optimized but may have new overhead. |
| Rollback Complexity | High | No built-in rollback; require backup of v4 branch or feature flags. |
filament-notification-channels)?artisan).v5-upgrade branch.composer require filament/upgrade --dev.database and storage/framework.php artisan filament:upgrade --dry-run
app/Providers/FilamentServiceProvider.php).php artisan filament:upgrade
composer.json to drop filament/upgrade and pin filament/filament:^5.0.composer update and php artisan optimize.| Component | Compatibility | Notes |
|---|---|---|
| Filament v4 Plugins | Partial | Check Filament v5 Plugin Store. |
| Custom Widgets | Manual Review Required | May need use statement or logic updates. |
| Laravel Packages | Varies | Test spatie/laravel-permission, laravel-breeze, etc. |
| Tailwind CSS | High | v5 uses Tailwind v3+ by default. |
| Database | No Changes | But related models (e.g., filament_users) may need updates. |
PostsResource, UsersResource).@test annotations for Resource methods).HasTable → Table class changes).Cache facade for resource lists.vendor/filament/filament/dist) if using static hosting.| Failure Scenario | Detection | Recovery |
|---|---|---|
| Upgrade Fails Mid-Execution | CLI error; incomplete changes | Restore from backup; retry with --force. |
| Runtime Errors Post-Upgrade | 500 errors in production | Rollback to v4 branch; patch manually. |
| Plugin Incompatibility | Missing features or blank screens | Replace/patch plugin; log issue upstream. |
| Data Corruption | Inconsistent records in DB | Audit filament_* tables; restore backup. |
Resource/Page structure.spatie/laravel-medialibrary integration (if used).How can I help you explore Laravel packages today?