From 195eee4e114790d5bcf30cda0b97bd9aa731d40d Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Mon, 28 Jun 2021 15:12:55 +0200 Subject: [PATCH 1/2] PHP 8.1: silence the deprecation notice about jsonSerialize() return type --- src/Enum.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Enum.php b/src/Enum.php index 6967ab5..20df959 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -311,6 +311,7 @@ public static function __callStatic($name, $arguments) * @link http://php.net/manual/en/jsonserializable.jsonserialize.php * @psalm-pure */ + #[ReturnTypeWillChange] public function jsonSerialize() { return $this->getValue(); From 4651dd3a6242d7f315f4e85ce94de9558e5b6ab8 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Mon, 28 Jun 2021 15:19:59 +0200 Subject: [PATCH 2/2] PHP 8.1: silence the deprecation notice about jsonSerialize() return type --- src/Enum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Enum.php b/src/Enum.php index 20df959..382e1c4 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -311,7 +311,7 @@ public static function __callStatic($name, $arguments) * @link http://php.net/manual/en/jsonserializable.jsonserialize.php * @psalm-pure */ - #[ReturnTypeWillChange] + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->getValue();