Closed samsonasik closed 1 year ago
@markstory I leave this up 2 you how you want to handle this. I am very new to the whole AST and PHP Parser system so I have no idea why this is so much more complicated than the previous nodeRemover functionality.
@LordSimal I simplified the logic ;) https://github.com/cakephp/upgrade/pull/236/commits/8a7f3aad11a168c09b840779b7bd227d83016ded
All green 🎉 I will let you take over ;)
I also add fixture test to skip for different static call to ensure no regression ;)
✔️ All green 🎉 ✔️ Simplifed code and handled avoid too deep traversal ✔️ Ready to merge 👍
@TomasVotruba I think we need to document this or a blog post how to migrate from NodeRemover
to use SimpleCallableNodeTraverser
;)
I'm no expert in PhpParser either, but the input/output looks good.
Ref https://github.com/cakephp/upgrade/pull/235#pullrequestreview-1473429118 /cc @LordSimal