| @@ -58,5 +58,18 @@ | ||
| 58 | 58 | public function bodyToIterable(): iterable |
| 59 | 59 | { |
| 60 | 60 | return $this->message->toIterable(); |
| 61 | 61 | } |
| 62 | + | |
| 63 | + /** | |
| 64 | + * @return array | |
| 65 | + */ | |
| 66 | + public function __sleep() | |
| 67 | + { | |
| 68 | + return ['message']; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public function __wakeup() | |
| 72 | + { | |
| 73 | + $this->__construct($this->message); | |
| 74 | + } | |
| 62 | 75 | } |