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
I am new to this project and I am trying to figure out how message serialization works. I know the default place for questions is usually stack overflow, but currently it doesn't have a bernard tag and I had a feeling that I would need to wait a few months to get an answer there :)
Bernard installed from composer (currently v0.13) comes with Bernard\Serializer\SimpleSerializer class and suggests using symfony or JMS serializers instead. This doc says that currently bernard uses symfony serializer by default.
On the other hand I couldn't find symfony/serializer in composer.json. The Bernard\Serializer namespace is gone and Bernard/Serializer class seems to use json_encode / json_decode. To confuse things even more, Bernard/Serializer is an interface in the latest composer and a class in the latest master branch.
So I figured I should go read the docs again :) This doc says that if I plan to use a custom message class (which I do), then I must provide a normalizer for it. Except there is no such thing in the currently available composer version of bernard.
My questions are:
PHP native serialize() function should be able to handle simple classes like PlainMessage. Why does bernard need complex serializers from symfony or JMS even for the most basic message type?
It seems that 0.x branch (which is installed by default via composer) is many years behind the current master and current documentation is no longer usable for 0.x. Is it generally a good idea to use the current master instead?
The text was updated successfully, but these errors were encountered:
Hi,
I am new to this project and I am trying to figure out how message serialization works. I know the default place for questions is usually stack overflow, but currently it doesn't have a bernard tag and I had a feeling that I would need to wait a few months to get an answer there :)
Bernard installed from composer (currently v0.13) comes with
Bernard\Serializer\SimpleSerializer
class and suggests using symfony or JMS serializers instead. This doc says that currently bernard uses symfony serializer by default.On the other hand I couldn't find symfony/serializer in composer.json. The
Bernard\Serializer
namespace is gone andBernard/Serializer
class seems to usejson_encode
/json_decode
. To confuse things even more,Bernard/Serializer
is an interface in the latest composer and a class in the latest master branch.So I figured I should go read the docs again :) This doc says that if I plan to use a custom message class (which I do), then I must provide a normalizer for it. Except there is no such thing in the currently available composer version of bernard.
My questions are:
PHP native
serialize()
function should be able to handle simple classes likePlainMessage
. Why does bernard need complex serializers from symfony or JMS even for the most basic message type?It seems that 0.x branch (which is installed by default via composer) is many years behind the current master and current documentation is no longer usable for 0.x. Is it generally a good idea to use the current master instead?
The text was updated successfully, but these errors were encountered: