From eb971aaaac8804f97e076a2d2d00e30e490958da Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 18 Mar 2022 12:47:40 -0500 Subject: [PATCH] BigInteger: fix deprecation notice --- phpseclib/Math/BigInteger.php | 1 + phpseclib/Math/BigInteger/Engines/Engine.php | 1 + phpseclib/Math/Common/FiniteField/Integer.php | 1 + 3 files changed, 3 insertions(+) diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index adf50838..c7b997cb 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -443,6 +443,7 @@ class BigInteger implements \JsonSerializable * * Will be called, automatically, when json_encode() is called on a BigInteger object. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { $result = ['hex' => $this->toHex(true)]; diff --git a/phpseclib/Math/BigInteger/Engines/Engine.php b/phpseclib/Math/BigInteger/Engines/Engine.php index fe6bff80..a332c5c1 100644 --- a/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/phpseclib/Math/BigInteger/Engines/Engine.php @@ -376,6 +376,7 @@ abstract class Engine implements \JsonSerializable * * Will be called, automatically, when json_encode() is called on a BigInteger object. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { $result = ['hex' => $this->toHex(true)]; diff --git a/phpseclib/Math/Common/FiniteField/Integer.php b/phpseclib/Math/Common/FiniteField/Integer.php index 120026e7..cd980273 100644 --- a/phpseclib/Math/Common/FiniteField/Integer.php +++ b/phpseclib/Math/Common/FiniteField/Integer.php @@ -31,6 +31,7 @@ abstract class Integer implements \JsonSerializable * PHP Serialize isn't supported because unserializing would require the factory be * serialized as well and that just sounds like too much */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ['hex' => $this->toHex(true)];