Lack of interest Implement Serializable in \XF\Phrase

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Sim

Well-known member
In one of my addons I am sending data to an external system by generating a Job with an array of data which can be sent asynchronously (and retried if sending fails!).

The array data contains phrases, which causes problems when the Job Manager attempts to serialize the data.

\XF\Phrase already implements \JsonSerializable so that when rendering JSON, it automatically calls __toString() on itself.

It would be useful if it could do the same thing when serializing the data - implement the Serializable interface which also simply calls __toString() on itself. I'm assuming that unserialize wouldn't need to do anything, since we are not trying to reconstitute the original Phrase object.

I don't really want to be passing json encoded data to the Job since there is a process later on which does the json encoding for me - it expects me to pass in an array of data.
 
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom