-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
Refactor file processors towards universal collector #6085
Conversation
0c6fa36
to
1b2798d
Compare
74fcd74
to
9a7532a
Compare
6301863
to
97bc86e
Compare
10dac16
to
04f00d5
Compare
5a77d7c
to
5239a3e
Compare
3cabf7d
to
a52080c
Compare
cdac2ba
to
0a88070
Compare
c3b58f5
to
ad7fe54
Compare
39da79d
to
23b5724
Compare
0e0c442
to
2093c5b
Compare
2093c5b
to
1b14ccb
Compare
@TomasVotruba Hi, I merged it into my branch with neon files. Content stops changing :) in my processor it is changed and I update content at the end of processing using $file->changeFileContent($newContent). I got this diff:
So something is wrong :) |
This should be called in the end of $this->fileDiffFileDecorator->decorate([$file]); It decorates the file with its diff. |
In all processors? I didn’t see that in existing processors. I found it in ApplicationFileProcessor::run. It should be enough, right? |
Not sure. I'll try to debug... |
I can prepare some failing small application later tonight if you will need |
So there must be a printer, because every processor has its own - PHP has php-parser printer, JSON has json printer etc. The best inspiration would be in the smaller one
UPDATED |
Failing CI is always the best 👍 |
OK I don't get it :) printer just creates new content as a string, then method changeFileContent is called and that's all... How is it possible that it works with composer, but not with NonPhpFileProcessor and NetteDINeonMethodCallRenamer too? |
I'm sure it is :) but this is a test for whole application, because all parts are working standalone, but not together :) |
Follow up to https://github.com/rectorphp/rector/pull/6060/files