Skip to content

fix: StaticLambdaFixer - do not make function static when it contains anonymous class having $this in the constructor#9088

Merged
kubawerlos merged 2 commits intoPHP-CS-Fixer:masterfrom
danog:fix_StaticLambdaFixer_anon_classes
Sep 28, 2025
Merged

fix: StaticLambdaFixer - do not make function static when it contains anonymous class having $this in the constructor#9088
kubawerlos merged 2 commits intoPHP-CS-Fixer:masterfrom
danog:fix_StaticLambdaFixer_anon_classes

Conversation

@danog
Copy link
Copy Markdown
Contributor

@danog danog commented Sep 23, 2025

See included, previously failing testcase.

@danog danog changed the title Fix StaticLambdaFixer when working with anonymous classes fix: StaticLambdaFixer when working with anonymous classes Sep 23, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Sep 23, 2025

Coverage Status

coverage: 94.147% (+0.002%) from 94.145%
when pulling 2d53d8a on danog:fix_StaticLambdaFixer_anon_classes
into b0a17bf on PHP-CS-Fixer:master.

@kubawerlos kubawerlos changed the title fix: StaticLambdaFixer when working with anonymous classes fix: StaticLambdaFixer - do not make function static when it contains anonymous class having $this in the constructor Sep 28, 2025
@kubawerlos kubawerlos merged commit 2e82f36 into PHP-CS-Fixer:master Sep 28, 2025
32 of 33 checks passed
@kubawerlos
Copy link
Copy Markdown
Member

Thank you @danog

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants