Skip to content

Fix to ensure support for both Livewire v3 and v4#5

Merged
PhiloNL merged 1 commit intowire-elements:mainfrom
h4or:main
Mar 12, 2026
Merged

Fix to ensure support for both Livewire v3 and v4#5
PhiloNL merged 1 commit intowire-elements:mainfrom
h4or:main

Conversation

@h4or
Copy link
Contributor

@h4or h4or commented Mar 12, 2026

Fixes #4

Problem

Version 2.0.1 added support for Livewire 4 by changing the call() method signature in SupportSignedActions to accept 5 parameters ($method, $params, $returnEarly, $metadata, $componentContext). However, Livewire 3's ComponentHook only passes 3 arguments to call(), resulting in:

Too few arguments to function SupportSignedActions::call(), 3 passed in ComponentHook.php on line 41 and exactly 5 expected

This breaks all Livewire 3 applications that update to livewire-strict 2.0.1.

Fix

Made $metadata and $componentContext optional by defaulting them to null. Since neither parameter is used in the method body, this is safe and maintains compatibility with both Livewire 3 (3 args) and Livewire 4 (5 args).

@PhiloNL PhiloNL merged commit 3055504 into wire-elements:main Mar 12, 2026
6 checks passed
@PhiloNL
Copy link
Contributor

PhiloNL commented Mar 12, 2026

Perfect, thanks @h4or for the quick fix 🙏

@h4or
Copy link
Contributor Author

h4or commented Mar 12, 2026

@PhiloNL happy to help :)

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.

v2.0.1 breaks support for Livewire 3 applications

2 participants