Skip to content

ProtocolBuffersMessage::__construct() is broken with repeated fields #41

@dcelasun

Description

@dcelasun

Latest version (0.2.6) seems to be broken with:

ProtocolBuffersMessage::__construct() expects parameter 1 to be array, object given

Sample proto:

message TestMessage
{
    repeated TestUser users = 1;
}

message TestUser
{
    required int64 id = 1;
}

Sample PHP:

$bar = new TestMessage(['users' => [
    new TestUser(['id' => 1])
]]);

Same problem also happens with setFrom() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions