How to add a feature toggle to custom created reusable rule? #5662
-
|
I'm creating a custom rules using documentation https://phpstan.org/developing-extensions/rules, but I cannot find any info how to implement a custom feature toggle for my rule (parameters -> featureToggles section). I would like to allow users to enable/disable certain rules based on feature toggle value. What I have tried:
Could someone briefly describe how to create it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Please don't reuse the Let me know if you have any more problems. |
Beta Was this translation helpful? Give feedback.
Please don't reuse the
featureTogglessection but create your own section likerokasToggles. And it's described here: https://phpstan.org/developing-extensions/dependency-injection-configuration#custom-parametersLet me know if you have any more problems.