Skip to content

Commit

Permalink
Explicitly forbid serialization and deserialization of driver
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Jan 25, 2025
1 parent f0e16e4 commit 09bf1bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/EventLoop/Internal/AbstractDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,4 +639,14 @@ private function createErrorCallback(): void
}
};
}

final public function __serialize(): never
{
throw new \Error(__CLASS__ . ' does not support serialization');
}

final public function __unserialize(array $data): never
{
throw new \Error(__CLASS__ . ' does not support deserialization');
}
}

0 comments on commit 09bf1bf

Please # to comment.