From 7159809e5cfa041dca28e61f7f7ae58063aae8ed Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Thu, 28 Nov 2024 05:54:44 +0100 Subject: [PATCH] Clearify serialization error message (#161) --- src/Enum.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Enum.php b/src/Enum.php index 9d09ae6..d602d8b 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -87,25 +87,23 @@ final public function __clone() } /** - * @throws LogicException Enums are not serializable - * because instances are implemented as singletons + * @throws LogicException Serialization is not supported by default in this pseudo-enum implementation * * @psalm-return never-return */ final public function __sleep() { - throw new LogicException('Enums are not serializable'); + throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation'); } /** - * @throws LogicException Enums are not serializable - * because instances are implemented as singletons + * @throws LogicException Serialization is not supported by default in this pseudo-enum implementation * * @psalm-return never-return */ final public function __wakeup() { - throw new LogicException('Enums are not serializable'); + throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation'); } /**