yiisoft / yiisoft/validator

Extract rule name and options to separate collector

Open
#682 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:under discussion
Dominant language
PHP
Stars
167
Forks
47
Avg merge
1d 19h
Merged PRs (30d)
3

Description

My suggestion:

  1. Remove method RuleInterface::getName().
  2. Remove interface RuleWithOptionsInterface.
  3. Remove RulesDumper.
  4. Create new RulesConvertor that would can be configured for usage with custom rules also.

Benefits:

  • more clear rule classes
  • allows move all default values to rule handlers, that allow override default values globally.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing RuleInterface, RuleWithOptionsInterface, and RulesDumper to understand how rule names and options are currently collected. Then assess the proposed RulesConvertor design, including custom-rule configuration and global default overrides; done means the extraction is defined and the existing interfaces and dumper are appropriately replaced.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.