[Php70] Skip rewriting to $this on static method or static closure on StaticCallOnNonStaticToInstanceCallRector by samsonasik · Pull Request #8026 · rectorphp/rector-src · GitHub
Skip to content

[Php70] Skip rewriting to $this on static method or static closure on StaticCallOnNonStaticToInstanceCallRector#8026

Merged
samsonasik merged 5 commits into
mainfrom
fix-static-this
Jun 5, 2026
Merged

[Php70] Skip rewriting to $this on static method or static closure on StaticCallOnNonStaticToInstanceCallRector#8026
samsonasik merged 5 commits into
mainfrom
fix-static-this

Conversation

@samsonasik

Copy link
Copy Markdown
Member

@samsonasik

Copy link
Copy Markdown
Member Author

@samsonasik samsonasik marked this pull request as draft June 5, 2026 14:17
@samsonasik

Copy link
Copy Markdown
Member Author

inside static closure seems needs special handling, updated test for not inside static class, but inside static closure eb938de

@samsonasik samsonasik marked this pull request as ready for review June 5, 2026 14:23
@samsonasik

Copy link
Copy Markdown
Member Author

@samsonasik samsonasik merged commit 78e99a4 into main Jun 5, 2026
64 checks passed
@samsonasik samsonasik deleted the fix-static-this branch June 5, 2026 14:27
TomasVotruba pushed a commit that referenced this pull request Jun 16, 2026
… StaticCallOnNonStaticToInstanceCallRector (#8026)

* [Php70] Fix rewriting to $this on static method or static closure

* fix

* Fix

* update static closure prove

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

StaticCallOnNonStaticToInstanceCallRector rule fails to check static context

1 participant