Skip to content

[Symfony61] Skip non static external class callable on MagicClosureTwigExtensionToNativeMethodsRector#927

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
wuchen90:magic-closure-for-external-class
Mar 19, 2026
Merged

[Symfony61] Skip non static external class callable on MagicClosureTwigExtensionToNativeMethodsRector#927
TomasVotruba merged 1 commit intorectorphp:mainfrom
wuchen90:magic-closure-for-external-class

Conversation

@wuchen90
Copy link
Contributor

No description provided.

@wuchen90 wuchen90 force-pushed the magic-closure-for-external-class branch from 2bc94e0 to 86b9cab Compare March 17, 2026 17:07
@samsonasik samsonasik requested a review from TomasVotruba March 17, 2026 17:11
@samsonasik
Copy link
Member

@wuchen90 btw, is this cover self::class, CurrentClass::class as well? In case you only want external class, you probably need to verify with something like:

if (! $this->isObjectType($targetNode, new \PHPStan\Type\ObjectType($currentClasss)) {
    return null;
}

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit 8e2adf2 into rectorphp:main Mar 19, 2026
7 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.

3 participants