You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #40314 improve exception message if symfony/security-csrf is missing (xabbuh)
This PR was merged into the 4.4 branch.
Discussion
----------
improve exception message if symfony/security-csrf is missing
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37452
| License | MIT
| Doc PR |
Commits
-------
1a26ed4 improve exception message if symfony/security-csrf is missing
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormRenderer.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ public function setTheme(FormView $view, $themes, $useDefaultThemes = true)
59
59
publicfunctionrenderCsrfToken($tokenId)
60
60
{
61
61
if (null === $this->csrfTokenManager) {
62
-
thrownewBadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct().');
62
+
thrownewBadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct(). Try running "composer require symfony/security-csrf".');
0 commit comments