Store sessions in database (#1736)
This commit is contained in:
@@ -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: ~
|
||||
|
||||
@@ -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
|
||||
# ================================================================================
|
||||
|
||||
Reference in New Issue
Block a user