Open vjik opened 3 months ago
- As an author of the custom rule, what would be different for me to implement / use the rule?
Implementation:
RuleInterface::getName()
need to implement only when user used convertation rules to arrayUsage:
- What if I want to ship it in a Composer package?
It can be configured via Yii Config or manually.
- As a rule user, what would be different for me?
See 1.
I like the ability to configure it, but I don't think we need to separate this information, since it logically belongs to rule itself.
In some cases need ability to configure converter rule to array. For example date format in date rule. In this case need to use separate converter.
My suggestion:
1) Remove method
RuleInterface::getName()
. 2) Remove interfaceRuleWithOptionsInterface
. 3) RemoveRulesDumper
. 4) Create newRulesConvertor
that would can be configured for usage with custom rules also.Benefits: