8000 improve exception message if symfony/security-csrf is missing · symfony/symfony@1a26ed4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a26ed4

Browse files
committed
improve exception message if symfony/security-csrf is missing
1 parent a5683c5 commit 1a26ed4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function setTheme(FormView $view, $themes, $useDefaultThemes = true)
5959
public function renderCsrfToken($tokenId)
6060
{
6161
if (null === $this->csrfTokenManager) {
62-
throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct().');
62+
throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct(). Try running "composer require symfony/security-csrf".');
6363
}
6464

6565
return $this->csrfTokenManager->getToken($tokenId)->getValue();

0 commit comments

Comments
 (0)
0