Skip to content

Move Livewire component registration from boot() to register()#89

Merged
awcodes merged 1 commit intoawcodes:5.xfrom
MACscr:fix/register-livewire-component-in-register
Feb 27, 2026
Merged

Move Livewire component registration from boot() to register()#89
awcodes merged 1 commit intoawcodes:5.xfrom
MACscr:fix/register-livewire-component-in-register

Conversation

@MACscr
Copy link
Copy Markdown
Contributor

@MACscr MACscr commented Feb 27, 2026

Problem

The Livewire::component('quick-create-menu', ...) call currently lives in the plugin's boot() method. In Livewire v4.2.0, internal timing changes mean this registration happens too late, causing:

Unable to find component: [quick-create-menu]

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 from boot() to register(), placing it before the existing renderHook() 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: Moved Livewire::component('quick-create-menu', Components\QuickCreateMenu::class) from boot() to register()

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.
@awcodes awcodes merged commit 752ef76 into awcodes:5.x Feb 27, 2026
5 checks passed
@awcodes
Copy link
Copy Markdown
Owner

awcodes commented Feb 27, 2026

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants