Filament v4 support breaks plugin in Filament v3 #58

Closed
opened 2025-07-14 13:06:17 +00:00 by Perturbatio · 1 comment
Perturbatio commented 2025-07-14 13:06:17 +00:00 (Migrated from github.com)

When including the plugin in a v3 project (v3.3.13) I get the following error:

pxlrbt\FilamentSpotlight\Actions\RegisterUserMenu::getName(): Argument #2 ($item) must be of type Filament\Actions\Action, Filament\Navigation\MenuItem given, called in /var/www/html/vendor/pxlrbt/filament-spotlight/src/Actions/RegisterUserMenu.php on line 20

This appears to be caused by the change to expecting an Action instance rather than a MenuItem but $panel->getUserMenuItems() returns an array of MenuItems

When including the plugin in a v3 project (v3.3.13) I get the following error: ``` pxlrbt\FilamentSpotlight\Actions\RegisterUserMenu::getName(): Argument #2 ($item) must be of type Filament\Actions\Action, Filament\Navigation\MenuItem given, called in /var/www/html/vendor/pxlrbt/filament-spotlight/src/Actions/RegisterUserMenu.php on line 20 ``` This appears to be caused by the change to expecting an `Action` instance rather than a `MenuItem` but `$panel->getUserMenuItems()` returns an array of `MenuItems`
pxlrbt commented 2025-07-17 19:00:51 +00:00 (Migrated from github.com)

Thanks for mentioning. I accidentally left v3 support in composer, but since there was only a minor change, why not support both versions.

I released v2.0.2 which should fix this.

Thanks for mentioning. I accidentally left v3 support in composer, but since there was only a minor change, why not support both versions. I released v2.0.2 which should fix this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pxlrbt/filament-spotlight#58
No description provided.