You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned
#51108
Closed
pixopa opened this issue
Jul 26, 2023
· 3 comments
ERROR: Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned {"exception":"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned at /Users/amitshinde/dev/swagify/users-service/vendor/symfony/http-foundation/Request.php:1517)
How to reproduce
Upgrade to latest version symfony/http-foundation and when trying to make a basic controller request, we are getting this error -
Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned {"exception":"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned at ../vendor/symfony/http-foundation/Request.php:1517)
Possible Solution
This section is causing the problem and returning ParameterBag instead of InputBag -
if ($this->request->count()) {
return clone $this->request;
}
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
symfony/http-foundation 6.3.1
Description
ERROR: Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned {"exception":"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned at /Users/amitshinde/dev/swagify/users-service/vendor/symfony/http-foundation/Request.php:1517)
How to reproduce
Upgrade to latest version symfony/http-foundation and when trying to make a basic controller request, we are getting this error -
Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned {"exception":"[object] (TypeError(code: 0): Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned at ../vendor/symfony/http-foundation/Request.php:1517)
Possible Solution
This section is causing the problem and returning ParameterBag instead of InputBag -
if ($this->request->count()) {
return clone $this->request;
}
Additional Context
No response
The text was updated successfully, but these errors were encountered: