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

TokenGetAllToObjectRector fails with "leaveNode() returned invalid value of type integer" #7892

Closed
nerones opened this issue Apr 20, 2023 · 0 comments · Fixed by rectorphp/rector-src#3644
Assignees
Labels

Comments

@nerones
Copy link

nerones commented Apr 20, 2023

Bug Report

Subject Details
Rector version 0.15.24

I'm upgrading a legacy system that was built with cakephp 2 to php 8.1. Rector was hanging and throwing errors sometimes, I was able to isolate this rule and file to reproduce one of the errors. There are other problems that I reported in other issues.

I'm not sure if this is an error in rector or in PhpParser, so I'm reporting it here, I think that the refactor messes up the node that it is changing, but I'm not sure because I don't fully understand how rector works.

Minimal PHP Code Causing Issue

https://getrector.com/demo/c6334ce9-fdf7-4bd0-9ed6-94ce626c3e28

Expected Behaviour

The rule should not throw an error

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