If you see anything missing from this guide, please make a pull request to the repository. Any help is appreciated!
New Requirements
Before upgrading, ensure your environment meets these requirements:- PHP 8.2+ (upgraded from PHP 8.1+)
- Laravel v11.28+ (upgraded from Laravel v10.0+)
- Tailwind CSS v4.1+ if you’re using a custom theme (upgraded from v3.0)
- Filament no longer requires
doctrine/dbal, but if your application still does, add it directly to yourcomposer.jsonfile
Running the Automated Upgrade Script
Install the upgrade package
Install the Filament upgrade package:
If installation fails, ensure your PHPStan version is at least v2, or your Larastan version is at least v3. The script uses Rector v2, which requires PHPStan v2 or higher.
Run the upgrade script
Execute the automated upgrade script:The script will analyze your codebase and output commands specific to your application. Follow the instructions carefully.
Update Composer dependencies
Run the commands output by the upgrade script to update your dependencies:
Review the changes
Carefully review all changes made by the script. You may need to make some manual adjustments based on your specific implementation.
Upgrade directory structure (optional)
Filament v4 introduces a new default directory structure for resources and clusters. To preview the changes:If you’re happy with the changes, apply them:
Publishing the Configuration File
Some changes in Filament v4 can be reverted using the configuration file. If you haven’t published it yet:Important Configuration Changes
High-Impact Breaking Changes
File Visibility Now Private by Default
For non-local disks (such ass3), file visibility is now private by default instead of public. This affects:
FileUploadform field (includingSpatieMediaLibraryFileUpload)ImageColumntable column (includingSpatieMediaLibraryImageColumn)ImageEntryinfolist entry (includingSpatieMediaLibraryImageEntry)
Custom Themes Must Use Tailwind CSS v4
Previously, custom theme CSS files contained:tailwind.config.js file is no longer used. Move any customizations to your CSS file using Tailwind v4 CSS configuration.
Tailwind Classes Require Custom Theme
In v3, Filament’s Blade views contained Tailwind CSS classes directly in the HTML. In v4, these classes have been moved to CSS files using@apply.
To fix this, create a custom theme:
@source entries pointing to your files:
Table Filters Are Deferred by Default
ThedeferFilters() method is now the default behavior. Users must click a button before filters are applied.
To disable this behavior:
Layout Components No Longer Span Full Width
TheGrid, Section, and Fieldset components now only consume one column by default.
To make them span all columns:
Medium-Impact Breaking Changes
columnSpan() Targets >= lg Devices by Default
In v3:
Enum Field State Always Returns Enum Instance
Fields writing to enum attributes now always return the enum instance (never the value):URL Parameter Names Changed
Filament v4 has renamed URL parameters on resource pages:activeRelationManager→relationactiveTab→tabisTableReordering→reorderingtableFilters→filterstableGrouping→groupingtableGroupingDirection→groupingDirectiontableSearch→searchtableSort→sort
Automatic Tenancy Scoping
Filament now automatically scopes all queries in a panel to the current tenant and associates new records with the current tenant. See the tenancy documentation for security considerations.Radio inline() Method Behavior
The inline() method now only puts radio buttons inline with each other, not with the label.
For both inline buttons and inline label:
Low-Impact Breaking Changes
Tables Have Default Primary Key Sorting
Tables now automatically sort by primary key to ensure consistent record ordering. To disable:unique() Validation Ignores Current Record by Default
In v4, unique() validation automatically ignores the current form’s Eloquent record.
To disable:
Pagination all Option Not Available by Default
The all pagination option is no longer available by default.
To add it:
Language Code Changes
Several translation language codes have changed:- European Portuguese:
pt_PT→pt - Nepalese:
np→ne - Norwegian:
no→nb - Khmer:
kh→km
Spatie Translatable Plugin Deprecated
The official Spatie Translatable Plugin is deprecated in v4. Use the Lara Zeus Translatable Plugin as a direct replacement. The automated upgrade script will suggest commands to migrate.Method Signature Changes
Severalmake() methods now accept nullable parameters. If you’re overriding these methods, update your signatures:
Testing Your Upgrade
After upgrading, thoroughly test your application:Test critical user flows
- Log in to the admin panel
- Create, edit, and delete records
- Test filters and search
- Verify file uploads
- Check custom pages and widgets
Check browser console
Look for JavaScript errors that might indicate missing assets or configuration issues.
Getting Help
If you encounter issues during the upgrade:- Check the GitHub Discussions for similar issues
- Join the Discord community for real-time help
- Review the full upgrade guide for additional details
Remember to update any custom plugins or packages you’ve built to be compatible with v4.