Прокинул теги в резолвер
This commit is contained in:
parent
859a7c3e0f
commit
9e42589419
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user