Move Livewire component registration from boot() to register()#89
Merged
awcodes merged 1 commit intoawcodes:5.xfrom Feb 27, 2026
Merged
Conversation
The Livewire::component() call in boot() registers the component too late in the Filament plugin lifecycle. In Livewire v4.2.0, internal timing changes exposed this latent issue, causing "Unable to find component: [quick-create-menu]" errors. The register() method runs during service provider registration, which is the correct phase for Livewire component registration. This matches the pattern used in the awcodes/recently plugin.
Owner
|
Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Livewire::component('quick-create-menu', ...)call currently lives in the plugin'sboot()method. In Livewire v4.2.0, internal timing changes mean this registration happens too late, causing:Root Cause
Filament's plugin lifecycle has two phases:
register()runs during service provider registration (i.e.,ServiceProvider::register()). This is the standard phase for binding components into the container and registering Livewire components.boot()runs lazily — it's triggered by Filament's middleware during HTTP request handling, after the framework has already booted.Livewire v4.2.0 tightened its internal component resolution timing, and by the time
boot()fires through Filament's middleware, it's too late for Livewire to recognize the component.Fix
Move the
Livewire::component()call fromboot()toregister(), placing it before the existingrenderHook()registration. This ensures the component is available when Livewire needs it.This matches the pattern used in awcodes/recently, which correctly registers its Livewire component in
register().Changes
src/QuickCreatePlugin.php: MovedLivewire::component('quick-create-menu', Components\QuickCreateMenu::class)fromboot()toregister()