Abdulkader Safi

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

Share
Composer dependency diagram showing Filament v4 locked to Livewire 3 and Filament v5 locked to Livewire 4, with an upgrade path going from Filament v3 straight to v5

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:

  1. Filament v3 to v4 with the official upgrade script. Test. Commit.
  2. 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

FAQ

Frequently asked questions

Can I upgrade Filament v3 to v5 without going through v4?

You still run the v4 upgrade script first, because that's where most of the code changes happen, but you don't have to ship or even commit a working v4 state. Run `filament-v4`, then `filament-v5`, then require Filament v5 and Livewire 4 together in one composer change. If you're staying on Livewire 3, v4 is a fine place to stop. If you need Livewire 4, it isn't.

Why does composer say Livewire 4 conflicts with Filament v4?

Every Filament v4 release requires Livewire 3. On Packagist, `filament/support` v4.17.3 requires `livewire/livewire ^3.8.12`, and v5.12.3 requires `^4.4.9`. No release lets Filament v4 and Livewire 4 install together, so `composer require livewire/livewire:^4.0` fails on a v4 app. Require `filament/filament:^5.0` and `livewire/livewire:^4.0` in the same command.

Does Filament v5 need Livewire 4?

Yes. The Filament 5.x upgrade guide lists Livewire 4.0 or newer as a requirement, along with PHP 8.2+, Laravel 11.28+, and Tailwind CSS 4.1+ if you compile a custom theme. Apps that use Filament's precompiled CSS don't need a local Tailwind compiler.

What happens to Volt components when I move to Livewire 4?

They keep working. `livewire/volt` added Livewire 4 to its requirements in 1.10.3 (February 2026), and Livewire 4's built-in single-file components use the same syntax as Volt's class-based ones. The Livewire 4 upgrade guide has a migration path to the built-in format. I had only two Volt forms, so I rewrote them as plain Livewire classes.

Why does my Livewire test fail after upgrading to Livewire 4?

If it sends a raw POST to the update endpoint, it now gets rejected. Livewire 4.2.0 requires the `X-Livewire` header and a JSON content type on update requests, and Livewire 4 moved the endpoint from `/livewire/` to `/livewire-{hash}/`. Use `postJson()`, add the header, and stop hard-coding the old path.

Which Filament plugins break on v5?

Any plugin whose current major only requires Filament ^3. Run `composer why-not filament/filament ^5.0` and it lists every package blocking the upgrade. Check Packagist for a newer major before dropping one: some plugins moved to a new major for v4 and v5, and a `^2.0` constraint will never pull it.

Written by

Abdulkader Safi

Lead Software Engineer

Lead engineer at DSRPT, from Lebanon and based in Kuwait. I write about the tools and bugs from real client work, with the numbers I measured.

About me → GitHub LinkedIn

Need this kind of work done on your project?

Start a project →

Keep reading

All articles →
  • Multitenancy data isolation spectrum, from a database per tenant down to a shared table with a tenant_id column and row-level security
    Laravel

    · 12 min read

    You probably don't need a database per tenant

    Database-per-tenant is the default people reach for in multitenancy, and it's usually the wrong one. Here's the full spectrum from separate instances down to a discriminator column, what each one costs you per tenant forever, and why Postgres plus row-level security is enough for most apps.

  • Laravel developer reviewing tangled runtime UI library dependencies vs clean copy-and-own Blade components
    Laravel

    · 8 min read

    Runtime UI Libraries Are Tech Debt You Can't See

    Every runtime UI package you install is a future refactor with a delivery date you don't control. Here's the hidden bill — and how laralcn-UI's copy-and-own model kills it for Laravel.