Can't dump rules under Nested rule
Open
Nobody has claimed this yet.
status:ready for adoption
type:bug
- Dominant language
- PHP
- Stars
- 167
- Forks
- 47
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
class Profile
{
#[Nested]
public ?Requisites $requisites = null;
}
class Requisites
{
#[Required]
public string $bik;
#[Required]
public string $rs;
}
RulesDumper::asArray((new ObjectDataSet(new Profile()))->getRules());
Result will be:
'requisites' => [
0 => [
0 => 'nested'
'noRulesWithNoObjectMessage' => [
'template' => 'Nested rule without rules can be used for objects only.'
'parameters' => []
]
'incorrectDataSetTypeMessage' => [
'template' => 'An object data set data can only have an array type.'
'parameters' => []
]
'incorrectInputMessage' => [
'template' => 'The value must be an array or an object.'
'parameters' => []
]
'noPropertyPathMessage' => [
'template' => 'Property "{path}" is not found.'
'parameters' => []
]
'requirePropertyPath' => false
'skipOnEmpty' => false
'skipOnError' => false
'rules' => null
]
]
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 by reproducing the example with RulesDumper::asArray, ObjectDataSet, Profile, Requisites, and the Nested rule. Read the nested-rule handling in the dumper and verify that dumping the nested rules produces the expected rules structure without the error metadata shown in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100