Skip to content

Commit

Permalink
feat(admin): activate PdoSessionHandler (new db env) (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 authored Jan 26, 2024
1 parent eb77214 commit 182aba9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $_SERVER['ELASTICMS_PATH'] = file_exists(dirname(__DIR__).'/vendor/elasticms') ?

$_SERVER['APP_RUNTIME_OPTIONS'] = [
'disable_dotenv' => ('true' === ($_SERVER['APP_DISABLE_DOTENV'] ?? false)),
'prod_envs' => ['prod', 'redis'],
'prod_envs' => ['prod', 'redis', 'db'],
'project_dir' => dirname(__DIR__),
];

Expand Down
3 changes: 2 additions & 1 deletion config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ when@prod: &doctrine_prod
doctrine.system_cache_pool:
adapter: cache.system

when@redis: *doctrine_prod
when@redis: *doctrine_prod
when@db: *doctrine_prod
7 changes: 6 additions & 1 deletion config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ when@redis:
session:
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler

when@db:
framework:
session:
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler

when@test:
framework:
test: true
session:
storage_id: session.storage.mock_file
storage_id: session.storage.mock_file
3 changes: 2 additions & 1 deletion config/packages/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ when@prod: &monolog_prod
channels: [ app,core,audit ]

when@redis: *monolog_prod
when@db: *monolog_prod

when@test:
monolog:
Expand All @@ -63,4 +64,4 @@ when@test:
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
level: debug

0 comments on commit 182aba9

Please sign in to comment.