You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tanks for your answer.
mutableFoo() do exactly what i expected.
It follows the protocol buffer spec:
"Note that you can call mutable_email() even if email is not already set; it will be initialized to an empty string automatically."
Great :)
"throwing an exception when user calls setter method from pseudo message"
I like this solution because an error will be throw "soon enough". I mean before serialization.
I almost forgot: your library is great ! The only thing missing is a ready to use package, or a tutorial. This tutorial could explain in one page how to install php-protocolbuffers + protoc-gen-php + compozer + use composer.
When using a get*() on a not initialized member of type 'message':
- message is ignored and NO error is throw during serialisation
// proto message:
message Foo {
required int32 a = 1;
}
message Container {
optional Foo foo = 1;
}
// php code:
$c = new Container();
$c->getFoo()->setA(0);
$c->serializeToString(); // no error, empty output. why ?
adding: $c->setFoo( new Foo() ); before calling getFoo() fix the problem...
I propose you to choose between two features:
The actual situation is disturbing.
The text was updated successfully, but these errors were encountered: