Skip to content

Commit

Permalink
Fix symfony/error-handler deprecations about required to be explici…
Browse files Browse the repository at this point in the history
…tly specified return types

```
PHP Deprecated: Method "Psr\Http\Message\ServerRequestInterface::getParsedBody()" might add "array|object|null" as a native return type declaration in the future. Do the same in implementation "Laminas\Diactoros\ServerRequest" now to avoid errors or add an explicit @return annotation to suppress this message. in .../vendor/symfony/error-handler/DebugClassLoader.php on line 330
PHP Deprecated: Method "Psr\Http\Message\ServerRequestInterface::getAttribute()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Laminas\Diactoros\ServerRequest" now to avoid errors or add an explicit @return annotation to suppress this message. in .../vendor/symfony/error-handler/DebugClassLoader.php on line 330
PHP Deprecated: Method "Psr\Http\Message\StreamInterface::getMetadata()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Laminas\Diactoros\Stream" now to avoid errors or add an explicit @return annotation to suppress this message. in .../vendor/symfony/error-handler/DebugClassLoader.php on line 330
```
  • Loading branch information
andrew-demb committed Jul 6, 2022
1 parent 54d4682 commit b35fb51
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CallbackStream.php
Expand Up @@ -159,6 +159,7 @@ public function getContents() : string

/**
* {@inheritdoc}
* @return mixed
*/
public function getMetadata($key = null)
{
Expand Down
1 change: 1 addition & 0 deletions src/RelativeStream.php
Expand Up @@ -169,6 +169,7 @@ public function getContents() : string

/**
* {@inheritdoc}
* @return mixed
*/
public function getMetadata($key = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/ServerRequest.php
Expand Up @@ -165,6 +165,7 @@ public function withQueryParams(array $query) : ServerRequest

/**
* {@inheritdoc}
* @return array|object|null
*/
public function getParsedBody()
{
Expand Down Expand Up @@ -199,6 +200,7 @@ public function getAttributes() : array

/**
* {@inheritdoc}
* @return mixed
*/
public function getAttribute($attribute, $default = null)
{
Expand Down
1 change: 1 addition & 0 deletions src/Stream.php
Expand Up @@ -301,6 +301,7 @@ public function getContents() : string

/**
* {@inheritdoc}
* @return mixed
*/
public function getMetadata($key = null)
{
Expand Down

0 comments on commit b35fb51

Please sign in to comment.