Прокинул теги в резолвер

This commit is contained in:
Rinsvent 2021-08-18 22:55:34 +07:00
parent 859a7c3e0f
commit 9e42589419
2 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ class Data2DtoConverter
if (!$reflectionMethod->isPublic()) {
$reflectionMethod->setAccessible(true);
}
$methodTags = $reflectionMethod->invoke($object, ...[$data]);
$methodTags = $reflectionMethod->invoke($object, ...[$data, $tags]);
if (!$reflectionMethod->isPublic()) {
$reflectionMethod->setAccessible(false);
}

View File

@ -11,8 +11,8 @@ class HelloTagsRequest extends HelloRequest
#[PropertyPath('fake_age2', tags: ['surname-group'])]
public int $age;
public function getTags(array $data)
public function getTags(array $data, array $tags)
{
return 'Surname1234' === ($data['surname'] ?? null) ? ['surname-group'] : ['default'];
return 'Surname1234' === ($data['surname'] ?? null) ? ['surname-group'] : $tags;
}
}