symfony get current user connected code example
Example: get user symfony
$user = $this->get('security.token_storage')->getToken()->getUser();
$user->getUsername();
$user = $this->get('security.token_storage')->getToken()->getUser();
$user->getUsername();