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

[Transform] Handle crash string in EnumCase on StringToClassConstantRector #2680

Merged
merged 4 commits into from Jul 18, 2022

Conversation

samsonasik
Copy link
Member

It currently make crash:

There was 1 error:

1) Rector\Tests\Transform\Rector\String_\StringToClassConstantRector\StringToClassConstantRectorTest::test with data set #1 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
Rector\Core\Exception\ShouldNotHappenException: Node "PhpParser\Node\Scalar\String_" with parent of "PhpParser\Node\Stmt\EnumCase" is missing scope required for scope refresh.

Fixes rectorphp/rector#7302

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @atsushi-matsui

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit a66e653 into main Jul 18, 2022
@TomasVotruba TomasVotruba deleted the handle-crash-string-to-class branch July 18, 2022 23:30
@TomasVotruba
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants