Closed wikando-km closed 3 years ago
That's great, thanks. Could you add a test?
Yes! Will do it when I have more time :)
I totally understand the first commit with the replacing of class names inside the function bodies, this is of course useful and I merged it.
But I don't understand the point of the second commit. On the one hand it goes against type resolving in the Printer, and anyway it would have to be done differently, because the last segment of the class name might not be sufficient, for example in the case of class Foo extends SubName\Bar
.
In order to create a class from an existing file and move it to another location with another namespace, it was necessary to be able to disable the replacing of class names in function bodies with fully qualified versions, and rather relying on correct use statements.
Also made the change in the most harmless way so nothing breaks :crossed_fingers:
Hope this is a valuable addition :)