File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed
Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4- 2.13.0
5- -------------------
6-
7- * The return types on the ` jsonSerialize ` implementations have been remove
8- to that they do not conflict with ` JsonSerializable::jsonSerialize ` on PHP
9- 8+. Reported by Gokul Hegde. GitHub #185 .
10-
1142.12.2 (2021-11-30)
125-------------------
136
Original file line number Diff line number Diff line change @@ -61,13 +61,7 @@ public function __isset(string $attr): bool
6161 return $ attr !== 'instance ' && isset ($ this ->{$ attr });
6262 }
6363
64- /**
65- * @return mixed data that can be serialized by json_encode
66- */
67- // We don't specify a return type here as PHP 8 has "mixed" as the return
68- // type for "JsonSerializable::jsonSerialize", but PHP 7 doesn't support
69- // "mixed".
70- public function jsonSerialize ()
64+ public function jsonSerialize (): array
7165 {
7266 return $ this ->raw ;
7367 }
Original file line number Diff line number Diff line change @@ -60,13 +60,7 @@ private function validAttribute(string $attr): bool
6060 return \in_array ($ attr , $ this ->validAttributes , true );
6161 }
6262
63- /**
64- * @return mixed data that can be serialized by json_encode
65- */
66- // We don't specify a return type here as PHP 8 has "mixed" as the return
67- // type for "JsonSerializable::jsonSerialize", but PHP 7 doesn't support
68- // "mixed".
69- public function jsonSerialize ()
63+ public function jsonSerialize (): ?array
7064 {
7165 return $ this ->record ;
7266 }
You can’t perform that action at this time.
0 commit comments