Skip to content

Commit 09bf1bf

Browse files
committed
Explicitly forbid serialization and deserialization of driver
1 parent f0e16e4 commit 09bf1bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/EventLoop/Internal/AbstractDriver.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,14 @@ private function createErrorCallback(): void
639639
}
640640
};
641641
}
642+
643+
final public function __serialize(): never
644+
{
645+
throw new \Error(__CLASS__ . ' does not support serialization');
646+
}
647+
648+
final public function __unserialize(array $data): never
649+
{
650+
throw new \Error(__CLASS__ . ' does not support deserialization');
651+
}
642652
}

0 commit comments

Comments
 (0)