I have integrated symfony messenger bundle and i am trying to encode that message . It was working in Symfony 3.4.4 version . However it is giving above error in Symfony 3.4.28 version. I have traced in symfony serialzer component , it seems that jsonEncoder is not listing in serialzer.php and which is causing this issue.
What is the reason for excluding json encoder in symfony serializer component. See below DoctrineTransportSender:
public function send(Envelope $envelope)
{
$encodedMessage = $this->encoder->encode($envelope);
}
//messenger configuration:
messenger:
transports:
# DSN: doctrine://$repository_alias/$queue_name
# most likely we do not need more repositories (unless there's a need for splitting MySQL table with messages)
main: "doctrine://default/test"
routing:
# message type to transport routes
Bundle\QueueBundle\Message\TestMessage: [ main ]
serializer:
enabled: true