Store sessions in database (#1736)

This commit is contained in:
Kevin Papst
2020-06-11 16:54:51 +02:00
committed by GitHub
parent a75bdc52f6
commit ea4e930cbb
23 changed files with 507 additions and 20 deletions

View File

@@ -6,9 +6,12 @@ framework:
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
#session:
# handler_id: session.handler.native_file
# save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%"
session:
handler_id: session.handler.native_file
save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%"
handler_id: App\Security\SessionHandler
#esi: ~
#fragments: ~

View File

@@ -104,6 +104,11 @@ services:
tags:
- { name: doctrine.event_listener, event: postConnect }
# store and retrieve sessions in and from database
App\Security\SessionHandler:
arguments:
- !service { class: PDO, factory: ['@database_connection', 'getWrappedConnection'] }
# ================================================================================
# FORMS
# ================================================================================