Hi,
Congrats for your amazing project. I really enjoy your work.
I have a question and I can use your help. Is there any easy and efficient way for Rector integration with other OSS? Because we want to integrate Rector and it can really help to getting ideas and saving time.
Thanks.
Hi, what exactly do you mean? Example of your goal would help
@TomasVotruba So, I contribute in PhpInsights. So, for v2.0 we want to add Rector to it and I want to know is there any proper way to do that? Do you have any external API's to make this work or anything else?
I see.
When you run Rector, you can use 3 different output formatters, e.g.
vendor/bin/rector process src --dry-run --output-format json
The output formatters are located here:
https://github.com/rectorphp/rector/tree/master/packages/changes-reporting/src/Output
Thanks a lot! I will close this issue then. If anything comes up, I will use your help again :sweat_smile:
@TomasVotruba So, I digging more a little bit in Rector. Now I want to know how can we run rector without using CLI tool? I want to trigger it from our code so we'll be able to control the flow.
BTW, thanks for your email.
It will be very limited and require bit learning from you side, but you can use ContainerFactory, create container, then get RectorApplication and use it.
See bin/rector to see more
@TomasVotruba It's awesome! Actually yesterday I did use it but didn't know it's the best approach. Thanks again :)
Most helpful comment
It will be very limited and require bit learning from you side, but you can use
ContainerFactory, create container, then getRectorApplicationand use it.See
bin/rectorto see more