From 5d848624c6761544ce83bd6674470aba05172cf2 Mon Sep 17 00:00:00 2001 From: kingIZZZY Date: Wed, 22 Jun 2022 17:45:58 -0400 Subject: [PATCH] PHP 8.1 compatibility / deprecation warnings PHP Deprecated: Return type of PrintNode\Entity::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/printnode/printnode-php/src/PrintNode/Entity.php on line 105 Explanation: https://stackoverflow.com/a/71133750 PrintNode's class Entity implements \JsonSerializable: https://www.php.net/manual/en/class.jsonserializable.php --- src/PrintNode/Entity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PrintNode/Entity.php b/src/PrintNode/Entity.php index 1a71c51..2430020 100755 --- a/src/PrintNode/Entity.php +++ b/src/PrintNode/Entity.php @@ -102,7 +102,7 @@ public function mapValuesFromJson($json) * * @return string */ - public function jsonSerialize() + public function jsonSerialize(): mixed { $json = array(); @@ -132,4 +132,4 @@ public function __toString() { } -} \ No newline at end of file +}