Skip to content

Commit e9a1e59

Browse files
committed
bug #846 ReturnTypeWillChange to suppress PHP8.1 Deprecation notice. (PhilETaylor)
This PR was merged into the 1.x branch. Discussion ---------- ReturnTypeWillChange to suppress PHP8.1 Deprecation notice. Pretty quick and standard change for PHP 8.1 Surpress: ``` Deprecation Notice: Return type of Symfony\Flex\Response::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/manage.mysites.guru/vendor/symfony/flex/src/Response.php:68 ``` Alternative solution to #848 Commits ------- ff0656a ReturnTypeWillChange to surpress PHP8.1 Deprecation notice.
2 parents 1b5c1ce + ff0656a commit e9a1e59

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Response.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public static function fromJson(array $json): self
6565
return $response;
6666
}
6767

68+
#[\ReturnTypeWillChange]
6869
public function jsonSerialize()
6970
{
7071
return ['body' => $this->body, 'headers' => $this->headers];

0 commit comments

Comments
 (0)