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

Toggle for resolving of class names when using withBodyFrom functionality #85

Merged
merged 2 commits into from
Aug 27, 2021
Merged

Toggle for resolving of class names when using withBodyFrom functionality #85

merged 2 commits into from
Aug 27, 2021

Conversation

wikando-km
Copy link

  • bug fix / new feature? feature
  • BC break? no

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 🤞

Hope this is a valuable addition :)

@dg
Copy link
Member

dg commented Jul 12, 2021

That's great, thanks. Could you add a test?

@wikando-km
Copy link
Author

Yes! Will do it when I have more time :)

@dg dg force-pushed the v3.5 branch 5 times, most recently from 65fcbb1 to 605a107 Compare August 25, 2021 10:03
@dg dg merged commit 6bb2ed8 into nette:v3.5 Aug 27, 2021
@dg
Copy link
Member

dg commented Aug 27, 2021

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.

dg added a commit that referenced this pull request Sep 21, 2021
dg added a commit that referenced this pull request Sep 21, 2021
dg added a commit that referenced this pull request Sep 21, 2021
dg added a commit that referenced this pull request Sep 21, 2021
dg added a commit that referenced this pull request Sep 21, 2021
dg added a commit that referenced this pull request Sep 22, 2021
dg added a commit that referenced this pull request Sep 22, 2021
dg added a commit that referenced this pull request Sep 22, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
dg added a commit that referenced this pull request Sep 23, 2021
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.

2 participants