-
Notifications
You must be signed in to change notification settings - Fork 50
[Docs] Document SDK marshaller #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a fundamental concept that needs documenting. Is there at least an example that I can take a look at? |
|
For my use case I ended up using a custom The difference between |
I'm writing this so it won't be forgotten when describing it. We've just encountered an unobvious behavior: unlike Symfony Serializer, (un-)marshaller creates an object past the constructor, which makes the use of initializations through the constructor promotion not work and the field remains uninitialized. See example: public function __contrcutor(
public ?Some $some = null, // the field will not be initialized
) {} public ?Some $some = null; // will be ok
public function __contrcutor(?Some $some = null)
{
$this->some = $some;
} |
@KorDum yes. Because in the first case the default value is related to parameter, not property. |
Documentation for the marshaller is completely missing. New users have no way to learn how to serialize data objects, typed lists, and more.
It's necessary to explain attributes like Marshal, MarshalArray, types, and so on.
The text was updated successfully, but these errors were encountered: