symfony get current user 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();