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
minor #16985 Adding that you cannot access a session inside a constructor (ThomasLandauer)
This PR was submitted for the 6.1 branch but it was squashed and merged into the 5.4 branch instead.
Discussion
----------
Adding that you cannot access a session inside a constructor
Please double-check!
The info is taken from PhpStorm's Symfony Plugin: https://espend.de/phpstorm/plugin/symfony#inspections:
> A Session must not be used inside a constructor
I think this should be explained here, since doing `$this->session = $requestStack->getSession();` right in the constructor looked like a nice idea...
Commits
-------
9f3b147 Adding that you cannot access a session inside a constructor
0 commit comments