Skip to content

Fix closure listener with parameters as reference - #69

Merged
LukeTowers merged 6 commits into
wintercms:wip/1.2from
mjauvin:fix-closure-listener
Feb 23, 2022
Merged

LukeTowers merged 6 commits into
wintercms:wip/1.2from
mjauvin:fix-closure-listener

Conversation

@mjauvin

@mjauvin mjauvin commented Feb 20, 2022 •

Copy link
Copy Markdown
Member

The previous behavior creates a "regular" Closure for the listener we already wrap in a SerializedClosure (in Laravel's Events::Dispatcher::makeListener() method).

This PR delays creating the SerializedClosure on the initial listener and waits for the Closure returned by Laravel's makeListener() method before wrapping it into a SerializedClosure.

@mjauvin
mjauvin changed the base branch from develop to wip/1.2 February 20, 2022 17:42
@mjauvin mjauvin added this to the v1.2.0 milestone Feb 22, 2022
@LukeTowers
LukeTowers merged commit 56e2582 into wintercms:wip/1.2 Feb 23, 2022
@LukeTowers LukeTowers mentioned this pull request Feb 23, 2022
45 of 71 tasks
@mjauvin
mjauvin deleted the fix-closure-listener branch February 23, 2022 21:41
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.

2 participants