Skip to content

Commit

Permalink
Add throwing __unserialize to ForbidSerialization
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Jan 25, 2025
1 parent 722f46b commit 3774a59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ForbidSerialization.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ 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 3774a59

Please sign in to comment.