Skip to content

Fix list field on 1.5 / Filament 4#2415

Open
ryanmitchell wants to merge 4 commits intolunarphp:1.xfrom
ryanmitchell:fix/1.5-list-field-type
Open

Fix list field on 1.5 / Filament 4#2415
ryanmitchell wants to merge 4 commits intolunarphp:1.xfrom
ryanmitchell:fix/1.5-list-field-type

Conversation

@ryanmitchell
Copy link
Copy Markdown
Contributor

The list field on the 1.5 beta currently fails with the error json_decode(): Argument #1 ($json) must be of type string, Lunar\FieldTypes\ListField given

this PR changes the field type to be arrayable to get around this.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a Filament 4 / Lunar 1.5 beta incompatibility where the List field can be treated as a non-string during JSON handling, causing json_decode() type errors, by making Lunar\FieldTypes\ListField implement Arrayable.

Changes:

  • Implement Illuminate\Contracts\Support\Arrayable on ListField.
  • Add toArray() to provide an array representation of the List field value for Filament 4 compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glennjacobs glennjacobs added the admin panel Improvements or additions to admin panel label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin panel Improvements or additions to admin panel

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants