@@ -1202,66 +1202,17 @@ The service id used for session storage. The ``session.storage`` service
1202
1202
alias will be set to this service id. This class has to implement
1203
1203
:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ SessionStorageInterface `.
1204
1204
1205
+ .. _config-framework-session-handler-id :
1206
+
1205
1207
handler_id
1206
1208
..........
1207
1209
1208
1210
**type **: ``string `` **default **: ``null ``
1209
1211
1210
1212
The service id used for session storage. The default ``null `` value means to use
1211
1213
the native PHP session mechanism. Set it to ``'session.handler.native_file' `` to
1212
- let Symfony manage the sessions itself using files to store the session
1213
- metadata.
1214
-
1215
- You can also configure the session handler with a DSN. For example:
1216
-
1217
- .. configuration-block ::
1218
-
1219
- .. code-block :: yaml
1220
-
1221
- # config/packages/framework.yaml
1222
- framework :
1223
- session :
1224
- # ...
1225
- handler_id : ' redis://localhost'
1226
- handler_id : ' %env(REDIS_URL)%'
1227
- handler_id : ' %env(resolve:DATABASE_URL)%'
1228
- handler_id : ' file://%kernel.project_dir%/var/sessions'
1229
-
1230
- .. code-block :: xml
1231
-
1232
- <!-- config/packages/framework.xml -->
1233
- <?xml version =" 1.0" encoding =" UTF-8" ?>
1234
- <container xmlns =" http://symfony.com/schema/dic/services"
1235
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1236
- xmlns : framework =" http://symfony.com/schema/dic/symfony"
1237
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
1238
- https://symfony.com/schema/dic/services/services-1.0.xsd
1239
- http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1240
-
1241
- <framework : config >
1242
- <framework : session enabled =" true"
1243
- handler-id =" redis://localhost"
1244
- handler-id =" %env(REDIS_URL)%"
1245
- handler-id =" %env(resolve:DATABASE_URL)%"
1246
- handler-id =" file://%kernel.project_dir%/var/sessions" />
1247
- </framework : config >
1248
- </container >
1249
-
1250
- .. code-block :: php
1251
-
1252
- // config/packages/framework.php
1253
- $container->loadFromExtension('framework', [
1254
- 'session' => [
1255
- // ...
1256
- 'handler_id' => 'redis://localhost',
1257
- 'handler_id' => '%env(REDIS_URL)%',
1258
- 'handler_id' => '%env(resolve:DATABASE_URL)%',
1259
- 'handler_id' => 'file://%kernel.project_dir%/var/sessions',
1260
- ],
1261
- ]);
1262
-
1263
- If you prefer to make Symfony store sessions in a database read
1264
- :doc: `/doctrine/pdo_session_storage `.
1214
+ let Symfony manage the sessions itself using files to store the session metadata.
1215
+ You can also :doc: `store sessions in a database </session/database >`.
1265
1216
1266
1217
.. _name :
1267
1218
0 commit comments