Generators are not used to the fullest in `Nested` rule
Open
Nobody has claimed this yet.
type:enhancement
- Dominant language
- PHP
- Stars
- 167
- Forks
- 47
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
Regardless of the passed rules' type it will always converted to array after this internal check:
Need to adjust ensureArrayHasRules() behavior. Or maybe go even further and validate it on the fly in the handler?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Rule/Nested.php at the referenced lines around ensureArrayHasRules() and trace how passed rules are converted and validated. Clarify whether generators should remain lazy or be validated in the handler, then verify that the chosen behavior no longer eagerly converts every rule type to an array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100