Skip to content

Commit 2ad39d4

Browse files
authored
fix(var-dumper): add casters for new public protobuf RepeatedField DTO (#187)
1 parent 581a282 commit 2ad39d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/functions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
use Buggregator\Trap\Client\TrapHandle\StackTrace;
1212
use Google\Protobuf\Internal\MapField;
1313
use Google\Protobuf\Internal\Message;
14-
use Google\Protobuf\Internal\RepeatedField;
14+
use Google\Protobuf\Internal\RepeatedField as InternalRepeatedField;
15+
use Google\Protobuf\RepeatedField;
1516
use Symfony\Component\VarDumper\Cloner\AbstractCloner;
1617

1718
try {
@@ -102,6 +103,7 @@ function td(mixed ...$values): never
102103
* @var array<non-empty-string, callable> $casters
103104
*/
104105
$casters[Message::class] ??= [ProtobufCaster::class, 'cast'];
106+
$casters[InternalRepeatedField::class] ??= [ProtobufCaster::class, 'castRepeated'];
105107
$casters[RepeatedField::class] ??= [ProtobufCaster::class, 'castRepeated'];
106108
$casters[MapField::class] ??= [ProtobufCaster::class, 'castMap'];
107109
$casters[EnumValue::class] ??= [ProtobufCaster::class, 'castEnum'];

0 commit comments

Comments
 (0)