Filament v3 to v5 upgrade: why Livewire 4 forces one jump
I planned to take my portfolio from Filament v3 to v4, then to v5. Composer killed step two, because Filament v4 pins Livewire 3. Here is the order that works and the five fixes the upgrade scripts left for me.
7 min read
You can't stop at Filament v4 and then add Livewire 4. Every Filament v4 release requires Livewire 3, so composer require livewire/livewire:^4.0 on a v4 app fails. The Filament v5 bump and the Livewire 4 bump have to land in the same composer change. I learned this on my own portfolio in August 2026, going from Filament 3.3.54 and Livewire 3.8.2 to Filament 5.7.6 and Livewire 4.4.2. Sixteen admin resources came through with no regressions.
Below is the plan that failed, the order that works, and the five fixes the upgrade scripts left for me.
Why I touched it at all
I didn't want to upgrade. My portfolio admin worked fine on v3.
Then I wanted to install Filament Atelier, my own page-builder plugin, on the site. Atelier requires Filament v5. So the upgrade was the toll for using my own plugin, which is where the devlog for this upgrade got its title.
If you're still deciding whether to upgrade at all, that's a different question, and I answered it in Filament v1 to v5: five years of shipping. This post is for when you've decided and want to know what breaks.
The two-step plan, and where it died
The plan looked careful:
- Filament v3 to v4 with the official upgrade script. Test. Commit.
- Filament v4 to v5, plus Livewire 3 to 4. Test. Commit.
Two small diffs, a tested state in the middle. Step one went fine. Step two failed on the first command.
Here's why. These are the Livewire requirements of the newest release in each Filament line, from Packagist on 1 December 2026:
filament/support v4.17.3 requires livewire/livewire ^3.8.12
filament/support v5.12.3 requires livewire/livewire ^4.4.9
No Filament v4 release accepts Livewire 4. No Filament v5 release accepts Livewire 3. So the middle state I planned (Filament v4 running on Livewire 4) doesn't exist. Composer can't install it, and it's right not to.
The fix is to move both packages in one composer require. That's the whole trick.
One thing worth saying clearly: the v4 step isn't wasted. Almost all the code changes happen there. The v4 upgrade guide is long (file visibility defaulting to private, Tailwind v4, deferred table filters, unique() ignoring the current record by default). The v5 upgrade guide lists no specific breaking changes of its own beyond the Livewire 4 requirement. It says the script handles them. If you're staying on Livewire 3, v4 is a fine place to stop.
The order that works
Do it on a branch. A failed jump on a branch costs you git switch main.
git switch -c upgrade/filament-v5
# 1. v3 -> v4 code changes
composer require filament/upgrade:"^4.0" -W --dev
vendor/bin/filament-v4
# run the commands the script prints (they're unique to your app), then:
composer require filament/filament:"^4.0" -W --no-update
composer update
# run your tests here. Commit as a checkpoint if they pass.
# 2. v4 -> v5, with Livewire 4 in the SAME require
composer require filament/upgrade:"^5.0" -W --dev
vendor/bin/filament-v5
composer require filament/filament:"^5.0" livewire/livewire:"^4.0" -W --no-update
composer update
php artisan optimize:clear
# 3. clean up
composer remove filament/upgrade --dev
Two notes on that.
On Windows PowerShell, swap every ^ for ~. PowerShell ignores ^ in version constraints, and the Filament docs call this out.
The v4 guide also offers php artisan filament:upgrade-directory-structure-to-v4, which moves resources into the new v4 folder layout. It's optional. I'd leave it for its own commit so the upgrade diff stays readable.
The five fixes the scripts left for me
The scripts did the bulk of the work. These five were manual, and the test suite found most of them before I did.
1. Two Volt forms became plain Livewire classes
My public site had two forms written in Volt: the service contact form and the resource subscribe form.
Volt itself still works on Livewire 4. livewire/volt added ^4.0 to its requirements in 1.10.3 (February 2026), and Livewire 4's own single-file components use the same syntax as Volt's class-based ones. The Livewire 4 upgrade guide walks through moving to the built-in format.
I rewrote mine as plain Livewire classes anyway. Two forms didn't justify an extra package. Each became a class with mount(), public properties and a submit() method, plus a Blade view:
namespace App\Livewire;
use Livewire\Component;
class ContactForm extends Component
{
public string $name = '';
public string $email = '';
public string $message = '';
public function mount(): void
{
// prefill anything the old Volt state() set up
}
public function submit(): void
{
$this->validate([
'name' => 'required|max:120',
'email' => 'required|email',
'message' => 'required|max:5000',
]);
// send it, store it, whatever the Volt version did
$this->reset(['name', 'email', 'message']);
}
public function render()
{
return view('livewire.contact-form');
}
}
2. A hardening test started failing
I had a test that sent a raw POST straight at the Livewire update endpoint, to prove it rejects junk. After the upgrade it failed.
Livewire 4.2.0 tightened the update endpoint: requests now need the X-Livewire header and a JSON content type. My test was sending neither. The fix was postJson() instead of post(), plus the header:
// before
$response = $this->post($updateUri, $payload);
// after
$response = $this->postJson($updateUri, $payload, ['X-Livewire' => 'true']);
While you're in there, check for hard-coded /livewire/update paths. Livewire 4 moved the endpoint to /livewire-{hash}/, with the hash derived from your APP_KEY. Firewall rules and CDN configs that match /livewire/ need the same update.
3. One namespace in the activity log package
rmsramos/activitylog changed its namespace in its v3 release. One use line in my code pointed at the old one. The test suite caught it on the first run. Five-second fix, but only because the test existed.
4. The analytics plugin I dropped (and shouldn't have needed to)
I had bezhansalleh/filament-google-analytics installed, read it as having no v4 or v5 release, removed it, and moved Google Analytics to plain script tags in the public layout's <head>.
Checking Packagist again for this post, I was wrong about the release. Version 3.2.0, out on 1 March 2026, requires filament/filament: ^4.0|^5.0. Support moved to a new major. A ^2.0 constraint in your composer.json will never pull it, so composer update looks like the plugin is stuck when it isn't.
Lesson: when a plugin blocks you, look for a newer major on Packagist before you rip it out. (The script tags are fine, for what it's worth. I don't miss the dashboard widget.)
5. A migration that assumed an empty database
A settings table migration ran Schema::create() without checking anything. Locally that was fine. On CI, the table already existed and the run failed. A guard fixed it:
public function up(): void
{
if (Schema::hasTable('settings')) {
return;
}
Schema::create('settings', function (Blueprint $table) {
// ...
});
}
Check your plugins before you start
The plugin question is where most upgrades stall, so ask Composer up front:
composer why-not filament/filament ^5.0
composer why-not livewire/livewire ^4.0
Each prints the packages that block that version. For every name on the list, open its Packagist page and look at the newest major, not just the newest patch of the one you have.
The Filament v5 guide gives you three options for a plugin with no v5 release: remove it from composer.json for now, swap it for a v5-compatible alternative, or wait. Whichever you pick, decide before you start the branch, not halfway through a broken composer update.
Also, composer update is a trust decision every time you run it. If you're pulling a dozen plugin majors in one go, read why composer update is now a security risk first.
What I'd do differently
I put both jumps into one commit with no tested state in between. It worked, but only because the test suite was decent.
Next time I'd commit the v4 state on the branch as a checkpoint and run the suite there, before touching Livewire. Filament v4 on Livewire 3 is a real, installable state. It's only Filament v4 on Livewire 4 that isn't. That checkpoint would have split my failures into "v4 broke this" and "Livewire 4 broke this", which is half the debugging.
What to do now
Run the two why-not commands above on your app today. It takes a minute and tells you whether this is an afternoon or a week. Then cut the branch and run the v4 script.
If the reason you're upgrading is a v5-only plugin like mine, have a look at what's new in Filament v4 too. Most of what you'll notice day to day arrived there, not in v5.
Last updated 1 Dec 2026 · filed under Laravel, filamentphp