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's method getSession can return null value, so when I tried call code like this: $request->getSession()->set(...) I got error:
Cannot call method set() on Symfony\Component\HttpFoundation\Session\SessionInterface|null.
I thought that checking if a request has sessions before call setter, resolve the problem, but unfortunately not. I created a repo which gives You a possibility to reproduce the problem:
Request's method
getSession
can returnnull
value, so when I tried call code like this:$request->getSession()->set(...)
I got error:I thought that checking if a request has sessions before call setter, resolve the problem, but unfortunately not. I created a repo which gives You a possibility to reproduce the problem:
https://github.com/plotek/symfony-phpstan
Possible workaround:
The text was updated successfully, but these errors were encountered: