From 1a26ed43e7c9cf05bebcc6113bd41aba455a23e6 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 26 Feb 2021 11:19:16 +0100 Subject: [PATCH] improve exception message if symfony/security-csrf is missing --- src/Symfony/Component/Form/FormRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index 64e7cf3746561..3aec936fd95a5 100644 --- a/src/Symfony/Component/Form/FormRenderer.php +++ b/src/Symfony/Component/Form/FormRenderer.php @@ -59,7 +59,7 @@ public function setTheme(FormView $view, $themes, $useDefaultThemes = true) public function renderCsrfToken($tokenId) { if (null === $this->csrfTokenManager) { - throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct().'); + throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct(). Try running "composer require symfony/security-csrf".'); } return $this->csrfTokenManager->getToken($tokenId)->getValue(); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy