Skip to content

Handle missing data properties in Livewire snapshots - #1207

Open
mrtimp wants to merge 2 commits into
spatie:mainfrom
mrtimp:main
Open

mrtimp wants to merge 2 commits into
spatie:mainfrom
mrtimp:main

Conversation

@mrtimp

@mrtimp mrtimp commented Sep 11, 2026

Copy link
Copy Markdown

When a Livewire component is updated adding new public properties that use laravel-data browsers who have the component open may attempted to submit an older snapshot lacking expected properties.

When LivewireDataSynth:: hydrate attempts to to access the property it results in the following unhandled error:

Undefined array key "[key name]"

The approach in this PR adjusts the handling slightly and I have hopefully included tests to cover the expected scenarios. Full disclosure I had Codex assist with the tests as it was a very complex scenario to reproduce and resolve.

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