From f290e0fa3e16fd4140f697ccdd6fce2a5807e93d Mon Sep 17 00:00:00 2001 From: Aleksandr Zhuravlev Date: Mon, 6 Sep 2021 16:33:53 +1200 Subject: [PATCH 1/2] Changed signature of Serializable::unserialize stub --- stubs/CoreGenericClasses.phpstub | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stubs/CoreGenericClasses.phpstub b/stubs/CoreGenericClasses.phpstub index bd915e9cb..73b1bdd4b 100644 --- a/stubs/CoreGenericClasses.phpstub +++ b/stubs/CoreGenericClasses.phpstub @@ -426,15 +426,15 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count interface Serializable { /** - * @return string the string representation of the object or null + * @return null|string the string representation of the object or null */ public function serialize(); /** - * @param string $serialized

+ * @param string $data * @return void */ - public function unserialize($serialized); + public function unserialize($data); } /** From 65407cc10d241c42695adf18e5d9c303dbd01131 Mon Sep 17 00:00:00 2001 From: Aleksandr Zhuravlev Date: Thu, 16 Sep 2021 23:07:32 +1200 Subject: [PATCH 2/2] Got rid of test --- stubs/CoreGenericClasses.phpstub | 2 +- tests/MethodSignatureTest.php | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/stubs/CoreGenericClasses.phpstub b/stubs/CoreGenericClasses.phpstub index 73b1bdd4b..b39af3df9 100644 --- a/stubs/CoreGenericClasses.phpstub +++ b/stubs/CoreGenericClasses.phpstub @@ -426,7 +426,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count interface Serializable { /** - * @return null|string the string representation of the object or null + * @return null|string */ public function serialize(); diff --git a/tests/MethodSignatureTest.php b/tests/MethodSignatureTest.php index 6ce52fb6b..5c222481d 100644 --- a/tests/MethodSignatureTest.php +++ b/tests/MethodSignatureTest.php @@ -1376,14 +1376,6 @@ class MethodSignatureTest extends TestCase }', 'error_message' => 'MoreSpecificImplementedParamType', ], - 'preventImplementingSerializableWithType' => [ - ' 'InvalidReturnType', - ], 'preventImplementingSerializableWithWrongDocblockType' => [ '