Skip to content

Commit

Permalink
ASV: suppress return type deprecation warning
Browse files Browse the repository at this point in the history
Forward compatibility for PHP 8.1:
This annotation suppresses the
 "Deprecated: Return type of mle86\Value\AbstractSerializableValue::
 jsonSerialize() should either be compatible with JsonSerializable::
 jsonSerialize(): mixed" warning
(without having to add an explicit "mixed" return type
which would not work with PHP7).
  • Loading branch information
mle86 committed Dec 21, 2021
1 parent 39872c5 commit 355570e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/AbstractSerializableValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function __toString(): string
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->value();
Expand Down

0 comments on commit 355570e

Please sign in to comment.