It looks to be the only missing thing from the configuration file.
Something like:
parameters:
levels:
- symfony40
- php73
What's the use case?
It's best practise to use one level at a time, so you're in the control of the change.
vendor/bin/rector process src --level symfony40
# check
# commit
vendor/bin/rector process src --level php73
# check
# commit
In case of analysis it makes sense, because you're code is untouched. Not here.
Also, level is actually config that is needed to create the DI container.
So it's like including config in a config :)
You can also do this:
# rector.yml
imports:
- { resource: "path-to-level.yml" }
The use case is simple: Integrate rector on a CI job.
Example with the twig20 level: It will move all the Twig_SimpleFilter to Twig_Filter.
I want to ensure the other contributors will not use Twig_SimpleFilter later thanks to the CI.
I may run the command many times on the CI, but it will be long. At least, can it be possible to combine multiple levels?
I see, with --dry-run?
@TomasVotruba If it returns a non-zero code, yes. With a git diff otherwise. :wink:
Continues in #800
@TomasVotruba Could please re-open this issue?
It was answered. This is the recommended way: https://github.com/rectorphp/rector/issues/799#issuecomment-442900225
Most helpful comment
The use case is simple: Integrate rector on a CI job.
Example with the
twig20level: It will move all theTwig_SimpleFiltertoTwig_Filter.I want to ensure the other contributors will not use
Twig_SimpleFilterlater thanks to the CI.I may run the command many times on the CI, but it will be long. At least, can it be possible to combine multiple levels?