-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Description
If your application doesn't have CSRF protection enabled, you'll see this error message when using forms that use CSRF:
throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct().'); |
This error message may be technically precise ... but it's not very useful because it doesn't explain how to solve the problem. The real solution is that you must set the framework.csrf_protection
config option to true
or null
. So, should we update this error message? Or does this error happen in several different circumstances and we can't update it? Thanks!
Schyzophrenic and morontt