aerni / statamic-livewire-forms

Supercharge your Statamic forms with Livewire
https://statamic.com/addons/aerni/livewire-forms
Other
28 stars 2 forks source link

Upgrade to Livewire 3 #43

Closed aerni closed 1 year ago

aerni commented 1 year ago

This PR upgrades the addon to Livewire 3. It comes with a couple of breaking changes that require some manual work.

Upgrade Guide

Namespace

The namespace of Livewire components has been updated. If you are using custom Livewire Form components, you should update the namespace from App\Http\Livewire to App\Livewire and move your files accordingly.

Reference: https://livewire.laravel.com/docs/upgrading#new-class-namespace

wire:model

In Livewire 3, wire:model is not "live" but "deferred" by default. This requires some changes in your field views. Follow the code changes outlined in commit https://github.com/aerni/statamic-livewire-forms/commit/e0f02b8b1bd6e6195939e18f4bddb72ba8f6fdd0 and https://github.com/aerni/statamic-livewire-forms/commit/0fd7215da1a256d7b720e32383c3a467bde1e9c1. If you want to use the "live" behavior from Livewire 2, you may add wire_model: live or wire_model: blur to your field's config in the blueprint.

Reference: https://livewire.laravel.com/docs/upgrading#wiremodel

j-jalving commented 1 year ago

Hi @aerni, I'd love to upgrade my project. Are you going to create a new tag for this?

aerni commented 1 year ago

There won't be a new tag. The next release will work with Livewire 3 and drop support for Livewire 2.

j-jalving commented 1 year ago

I see, so when is the next release planned?

aerni commented 1 year ago

Whenever I get to it. No ETA. Thinking about a major refactoring.