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

[11.x] Set the value of $this in macro closures #51401

Merged
merged 1 commit into from
May 16, 2024

Conversation

simonwelsh
Copy link
Contributor

PHPStan 1.11.0 introduced a way to set the value of $this inside closures (https://phpstan.org/blog/phpstan-1-11-errors-identifiers-phpstan-pro-reboot#what-is-a-passed-closure-bound-to%3F). Setting this on the Macroable trait allows for all uses of that trait to benefit from the static analyser knowing the actual value of $this.

@simonwelsh
Copy link
Contributor Author

Let me know if you'd prefer this to be sent to Larastan instead of having it in core.

@taylorotwell taylorotwell merged commit 4ab7387 into laravel:11.x May 16, 2024
28 checks passed
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