The JsonProducer currently directly passes the result of json_encode($message) to the exchange. In the case of an error during json_encode, it will return false, causing a type-exception as exchange->publish expects the value to be an string, not a boolean.
Instead the JsonProducer should throw an exception if the message cannot be serialized.
The
JsonProducer
currently directly passes the result ofjson_encode($message)
to the exchange. In the case of an error duringjson_encode
, it will return false, causing a type-exception asexchange->publish
expects the value to be an string, not a boolean. Instead theJsonProducer
should throw an exception if the message cannot be serialized.