Skip to content

[DeadCode] Skip parent not found on RemoveParentCallWithoutParentRector#1510

Merged
TomasVotruba merged 3 commits intomainfrom
skip-parent-not-found
Dec 16, 2021
Merged

[DeadCode] Skip parent not found on RemoveParentCallWithoutParentRector#1510
TomasVotruba merged 3 commits intomainfrom
skip-parent-not-found

Conversation

@samsonasik
Copy link
Copy Markdown
Member

Fixes rectorphp/rector#6873

When parent not found, it currently got error:

1) Rector\Tests\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector\Php74Test::test with data set #1 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
LogicException: leaveNode() returned invalid value of type integer

@samsonasik
Copy link
Copy Markdown
Member Author

Fixed 🎉

@samsonasik
Copy link
Copy Markdown
Member Author

/cc @norgeindian

@samsonasik samsonasik changed the title [DeadCode] Handle parent not found on RemoveParentCallWithoutParentRector [DeadCode] Skip parent not found on RemoveParentCallWithoutParentRector Dec 16, 2021
@samsonasik
Copy link
Copy Markdown
Member Author

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

@TomasVotruba TomasVotruba merged commit 4bac761 into main Dec 16, 2021
@TomasVotruba TomasVotruba deleted the skip-parent-not-found branch December 16, 2021 23:50
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.

Get leaveNode() returned invalid value of type integer error, if parent class does not exist

3 participants