Replies: 1 comment 12 replies
-
In Console commands there's no HTTP context, so there are no requests and no sessions. It's mentioned here: https://symfony.com/doc/current/routing.html#generating-urls-in-commands If you want to control the browser programmatically with a console command, see https://github.com/symfony/panther |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use Symfony 5.3.6 PHP 7.4.14
i inject $requestStack in constructor my command class.
in method execute i call $requestStack->getCurrentRequest()->getSession(), but getCurrentRequest() return null.
How get session? SessionInterface is deprecated
Beta Was this translation helpful? Give feedback.
All reactions