diff --git a/src/Generator.php b/src/Generator.php index ee01a41e94..e605ef3112 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -966,8 +966,8 @@ public function __destruct() $this->seed(); } - public function __wakeup() + public function __unserialize(array $data) { - $this->formatters = []; + throw new \Exception('Generator cannot be unserialized'); } }