Skip to content

Comments

feat: add support for Filament v5 and Livewire v4#75

Open
MB116 wants to merge 1 commit intokenepa:4.xfrom
MB116:filament-v5
Open

feat: add support for Filament v5 and Livewire v4#75
MB116 wants to merge 1 commit intokenepa:4.xfrom
MB116:filament-v5

Conversation

@MB116
Copy link

@MB116 MB116 commented Feb 18, 2026

Summary

This PR adds support for Filament v5 and Livewire v4.

Changes

\composer.json\

  • Bumped \ ilament/filament\ dependency from ^4.0\ to ^5.0\
  • Added ^13.0\ to \illuminate/contracts\ version constraint
  • Removed \orchestra/testbench ^7.0\ (incompatible with Filament v5 / Laravel 11+)
  • Dropped \pestphp/pest-plugin-livewire ^2.0\ (Livewire v4 requires ^3.0)

Event listeners: \->listeners\ → #[On]\ attributes

Livewire v4 deprecates the \->listeners\ array in favor of the #[On]\ PHP attribute. The old approach still works but is not recommended.

  • **\UsesResourceLock**: removed \�ootUsesResourceLock()\ boot method, added #[On('resourceLockObserver::init')], #[On('resourceLockObserver::unload')]\ and #[On('resourceLockObserver::unlock')]\ attributes to the corresponding handler methods
  • **\UsesSimpleResourceLock**: removed \�ootUsesSimpleResourceLock()\ boot method, added #[On('resourceLockObserver::unload')]\ and #[On('resourceLockObserver::unlock')]\ attributes
  • **\UsesLocks**: added #[On('resourceLockObserver::renewLock')]\ attribute to
    enewLock()\

Blade component rendering

Livewire v4 requires component tags to be properly closed. Replaced the deprecated @livewire()\ Blade directive with a self-closing component tag:

\\php
// Before
Blade::render('@livewire('resource-lock-observer')')

// After
Blade::render('<livewire:resource-lock-observer />')
\\

Compatibility

Package Version
PHP ^8.2
Laravel ^11.28
Filament ^5.0
Livewire ^4.0 (pulled in by Filament v5)

- Bump filament/filament dependency to ^5.0
- Bump illuminate/contracts to include ^13.0
- Remove orchestra/testbench ^7.0 (incompatible with Filament v5)
- Remove pestphp/pest-plugin-livewire ^2.0 (Livewire v4 requires ^3.0)
- Replace deprecated \->listeners array with #[On] PHP attributes
  in UsesResourceLock, UsesSimpleResourceLock and UsesLocks traits
  (Livewire v4 prefers attribute-based event listeners)
- Replace deprecated @livewire() Blade directive with self-closing
  component tag <livewire:resource-lock-observer /> (required in Livewire v4)
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.

1 participant