redis session

This commit is contained in:
2022-08-22 16:24:02 +02:00
parent 7fdf41aac8
commit f97bac6e5e
5 changed files with 62 additions and 3 deletions

View File

@ -7,7 +7,7 @@ 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: null
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
name: '%env(APP_ALIAS)%'
gc_probability: null
cookie_secure: auto

View File

@ -113,6 +113,17 @@ services:
resource: '../src/Controller'
tags: ['controller.service_arguments']
Redis:
class: Redis
calls:
- connect:
- '%env(REDIS_HOST)%'
- '%env(int:REDIS_PORT)%'
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
arguments:
- '@Redis'
App\EventListener\AllSubscriber:
public: true
tags: