feat: add support for Filament v5 and Livewire v4#75
Open
MB116 wants to merge 1 commit intokenepa:4.xfrom
Open
feat: add support for Filament v5 and Livewire v4#75MB116 wants to merge 1 commit intokenepa:4.xfrom
MB116 wants to merge 1 commit intokenepa:4.xfrom
Conversation
- 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)
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.
Summary
This PR adds support for Filament v5 and Livewire v4.
Changes
\composer.json\
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.
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