Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Add flush state and feature listeners to support Octane #3987

Merged
merged 1 commit into from Oct 11, 2021

Conversation

joshhanley
Copy link
Member

@joshhanley joshhanley commented Oct 10, 2021

Currently some of Livewire's feature classes are retaining state between requests when using Octane, see #2859,#3492, #3509.

This PR adds a method to the LivewireManager class called flushState that fires an internal Livewire event, that the feature classes can listen to and reset their own state.

A corresponding PR will be submitted to Octane, with an Octane listener that triggers this flushState method as required to prepare for new requests.

This will allow us to add new features to Livewire without needing to add a corresponding PR to Octane.

Hope this helps!

Edit: Here is the Octane PR laravel/octane#400

@calebporzio
Copy link
Collaborator

Love it. Thanks @joshhanley - great work on this!

@calebporzio calebporzio merged commit 72ffd38 into livewire:master Oct 11, 2021
@joshhanley joshhanley deleted the octane-flush-state branch October 11, 2021 20:47
@joshhanley
Copy link
Member Author

No worries! 🙂

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.

None yet

2 participants