public function setFlashMessage(Form $form, $message, SessionInterface $session = null)
    {
        if (null === $session) {
            trigger_error(
                "Please do not rely on the container's instance of the session, but fetch it from the Request",
                E_USER_DEPRECATED
            );
            $session = $this->session;
        }
        $session->getFlashBag()->set($this->getFormId($form), $message);
    }