From e3080578d8c6b195458db260869a7213f573b41b Mon Sep 17 00:00:00 2001 From: Mark Dain Date: Sat, 26 Feb 2022 11:23:53 +0000 Subject: [PATCH] JsonBomb: Don't directly type hint `mixed' Under PHP 7.x this causes an error: Return value of JsonBomb::jsonSerialize() must be an instance of mixed, resource returned Because `mixed' is not recognized as an actual type hint before PHP 8. --- src/Json/JsonBomb.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Json/JsonBomb.php b/src/Json/JsonBomb.php index 81176f5..853cd27 100644 --- a/src/Json/JsonBomb.php +++ b/src/Json/JsonBomb.php @@ -15,7 +15,10 @@ */ final class JsonBomb implements JsonSerializable { - public function jsonSerialize(): mixed + /** + * @return mixed + */ + public function jsonSerialize() { return fopen('php://memory', 'w'); }