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:
…and then manually register Filament, Livewire, and related providers inside config/app.php, I immediately hit this error after a component hook runs:
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:Jump to solution
Make sure that all of filament’s providers are loaded before the livewire provider.
2 Replies