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
We are building a trading bot, so we have are calling CoinbaseFacade from Queue, It throws "Serialization of 'Closure' is not allowed", Not sure how to fix that
The text was updated successfully, but these errors were encountered:
Can you show me the whole example? CoinbaseFacade doesn't need to be serialized, as it contains only static methods, so why serialize an object that can't be parameterized (immutable).
I think that in reality, it is coibaseApi that you serialize, indeed it includes closures which are not natively serializable in php. I implemented a fix to work around the problem, the error should not appear anymore in case of serialization. Make sure you update the package in your project.
Anyway, in case of serialization of such an object, and in the context of cryptos, I strongly advise you to encrypt your serialization to reduce the exposure of sensitive data.
A better solution, in my opinion, seems to be to instantiate your object from your queue task. If you provide me with more details of your code, I could guide you in this direction; and if not, linearization should not be a problem anymore.
Serialization of 'Closure' is not allowed
We are building a trading bot, so we have are calling CoinbaseFacade from Queue, It throws "Serialization of 'Closure' is not allowed", Not sure how to fix that
The text was updated successfully, but these errors were encountered: