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
Just update one of my Symfony 5.1.0 website to 5.1.1 and get the following exception.
Any of the followings will make the exception disappear:
Downgrade security-bundle to 5.1.0
Disable enable_authenticator_manager
Disable csrf_protection
TypeError:
Argument 1 passed to Symfony\Component\Security\Http\EventListener\CsrfProtectionListener::__construct() must implement interface Symfony\Component\Security\Csrf\CsrfTokenManagerInterface, instance of Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage given, called in C:\Users\Username\Desktop\my_project\var\cache\dev\Container6bbLKMb\getSecurity_Listener_CsrfProtectionService.php on line 22
at C:\Users\Username\Desktop\my_project\vendor\symfony\security-http\EventListener\CsrfProtectionListener.php:31
at Symfony\Component\Security\Http\EventListener\CsrfProtectionListener->__construct(object(SessionTokenStorage))
(C:\Users\Username\Desktop\my_project\var\cache\dev\Container6bbLKMb\getSecurity_Listener_CsrfProtectionService.php:22)
at Container6bbLKMb\getSecurity_Listener_CsrfProtectionService::do(object(App_KernelDevDebugContainer), true)
(C:\Users\Username\Desktop\my_project\var\cache\dev\Container6bbLKMb\App_KernelDevDebugContainer.php:438)
at Container6bbLKMb\App_KernelDevDebugContainer->load('getSecurity_Listener_CsrfProtectionService.php')
(C:\Users\Username\Desktop\my_project\var\cache\dev\Container6bbLKMb\App_KernelDevDebugContainer.php:735)
at Container6bbLKMb\App_KernelDevDebugContainer->Container6bbLKMb\{closure}()
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\EventDispatcher.php:245)
at Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('Symfony\\Component\\Security\\Http\\Event\\CheckPassportEvent')
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\EventDispatcher.php:84)
at Symfony\Component\EventDispatcher\EventDispatcher->getListeners('Symfony\\Component\\Security\\Http\\Event\\CheckPassportEvent')
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\Debug\TraceableEventDispatcher.php:99)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->getListeners()
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\Debug\TraceableEventDispatcher.php:195)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->getNotCalledListeners(null)
(C:\Users\Username\Desktop\my_project\vendor\symfony\http-kernel\DataCollector\EventDataCollector.php:66)
at Symfony\Component\HttpKernel\DataCollector\EventDataCollector->lateCollect()
(C:\Users\Username\Desktop\my_project\vendor\symfony\http-kernel\Profiler\Profiler.php:97)
at Symfony\Component\HttpKernel\Profiler\Profiler->saveProfile(object(Profile))
(C:\Users\Username\Desktop\my_project\vendor\symfony\http-kernel\EventListener\ProfilerListener.php:112)
at Symfony\Component\HttpKernel\EventListener\ProfilerListener->onKernelTerminate(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\Debug\WrappedListener.php:117)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\EventDispatcher.php:230)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener)), 'kernel.terminate', object(TerminateEvent))
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\EventDispatcher.php:59)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
(C:\Users\Username\Desktop\my_project\vendor\symfony\event-dispatcher\Debug\TraceableEventDispatcher.php:151)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
(C:\Users\Username\Desktop\my_project\vendor\symfony\http-kernel\HttpKernel.php:99)
at Symfony\Component\HttpKernel\HttpKernel->terminate(object(Request), object(Response))
(C:\Users\Username\Desktop\my_project\vendor\symfony\http-kernel\Kernel.php:161)
at Symfony\Component\HttpKernel\Kernel->terminate(object(Request), object(Response))
(C:\Users\Username\Desktop\my_project\public\index.php:30)
How to reproduce
If a repo is preferred, https://git.io/JfHB6 but it's easy to reproduce it from a fresh state.
Create new project: symfony new my_project --full
Add a default controller. Create src/Controller/DefaultController.php
Symfony version(s) affected: 5.1.1
Description
Just update one of my Symfony 5.1.0 website to 5.1.1 and get the following exception.
Any of the followings will make the exception disappear:
security-bundle
to 5.1.0enable_authenticator_manager
csrf_protection
How to reproduce
If a repo is preferred, https://git.io/JfHB6 but it's easy to reproduce it from a fresh state.
symfony new my_project --full
src/Controller/DefaultController.php
enable_authenticator_manager
inconfig/packages/security.yaml
The text was updated successfully, but these errors were encountered: