© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•5mo ago•
3 replies
br1

Filament v4 migration: Livewire SupportValidation breaks with global dont-discover

Hi everyone,
I’m migrating a project from Filament v3 to v4 and I’ve run into an issue when disabling Laravel package discovery.

Environment:
Laravel 12.31.1 (migrated from 11)
Filament 3.2.117 → 4.x migration
Livewire 3.5.6 -> 3.6.4

Here’s the situation:
With default package discovery, everything works fine.
But when I disable discovery globally in composer.json:

"extra": {
    "laravel": {
        "dont-discover": [
            "*"
        ]
    }
}
"extra": {
    "laravel": {
        "dont-discover": [
            "*"
        ]
    }
}

…and then manually register Filament, Livewire, and related providers inside config/app.php, I immediately hit this error after a component hook runs:
Illuminate\Support\ViewErrorBag::put(): Argument #2 ($bag) must be of type 
Illuminate\Contracts\Support\MessageBag, null given, 
called in /app/vendor/livewire/livewire/src/Features/SupportValidation/SupportValidation.php on line 21
Illuminate\Support\ViewErrorBag::put(): Argument #2 ($bag) must be of type 
Illuminate\Contracts\Support\MessageBag, null given, 
called in /app/vendor/livewire/livewire/src/Features/SupportValidation/SupportValidation.php on line 21

This looks like the error bag is being accessed before the component is fully hydrated. The strange part is that this exact setup worked fine in Filament v3, and only fails now after the upgrade to v4 with discovery disabled.

- Has anyone experienced this issue before when migrating to Filament v4 with package discovery disabled?
- Is there a recommended way to manually bootstrap Filament and Livewire so that all component hooks and validation features work correctly while keeping global package discovery disabled?

Any tips on initialization order or required providers would be greatly appreciated.


Thanks a lot for any insights!
Solution
Make sure that all of filament’s providers are loaded before the livewire provider.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Incompatibility issue of FIlament v4 with Livewire v4
FilamentFFilament / ❓┊help
4w ago
Filament v4
FilamentFFilament / ❓┊help
6mo ago
Filament v4
FilamentFFilament / ❓┊help
2y ago
Filament v4 + Livewire null error bag on login
FilamentFFilament / ❓┊help
5mo ago