Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Remove unusedmount() arguments from Livewire directive#9194

Open
AJenbo wants to merge1 commit intolivewire:main
base:main
Choose a base branch
Loading
fromAJenbo:patch-1

Conversation

AJenbo
Copy link

@AJenboAJenbo commentedFeb 19, 2025
edited
Loading

The problem

Themount() method inLivewireManager is defined with 3 parameters:

functionmount($name,$params = [],$key =null)

However, the generated code calls this method with5 arguments, which causes PHPStan to report a mismatch. Since the method signature doesn't account for the extra arguments, static analysis sees it as an incorrect method call—even though those extra arguments are unused.

This shows up when analyzing Blade templates and can be confusing or noisy for users relying on stricter static analysis levels.

The solution

This PR removes the extra, unused arguments passed tomount(), aligning the call with the method’s actual signature. This eliminates unnecessary static analysis warnings without changing any runtime behavior.

The conversation

If the extra arguments are included intentionally—for example, to support future use cases or give extended components access to more context—an alternative would be to add the extra parameters to themount() method signature instead. That would preserve compatibility and still satisfy static analysis tools.

I'm open to whichever approach makes the most sense long-term!

@lrljoe
Copy link
Contributor

This is for backwards compatibility I believe!

@AJenbo
Copy link
Author

In that case can we instead add the 2 unused arguments to the mount method?

@AJenbo
Copy link
Author

@calebporzio since you are the author of3d47803 could you look at this?
It's unclear if this is an unintended left over, or intentional.

@joshhanleyjoshhanley changed the titleRemove unused argumentsRemove unusedmount() arguments from Livewire directiveApr 9, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@AJenbo@lrljoe@joshhanley

[8]ページ先頭

©2009-2025 Movatter.jp