@@ -1233,70 +1233,17 @@ The service id used for session storage. The ``session.storage`` service
1233
1233
alias will be set to this service id. This class has to implement
1234
1234
:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ SessionStorageInterface `.
1235
1235
1236
+ .. _config-framework-session-handler-id :
1237
+
1236
1238
handler_id
1237
1239
..........
1238
1240
1239
1241
**type **: ``string `` **default **: ``null ``
1240
1242
1241
1243
The service id used for session storage. The default ``null `` value means to use
1242
1244
the native PHP session mechanism. Set it to ``'session.handler.native_file' `` to
1243
- let Symfony manage the sessions itself using files to store the session
1244
- metadata.
1245
-
1246
- You can also configure the session handler with a DSN. For example:
1247
-
1248
- .. configuration-block ::
1249
-
1250
- .. code-block :: yaml
1251
-
1252
- # config/packages/framework.yaml
1253
- 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
- .. code-block :: xml
1262
-
1263
- <!-- config/packages/framework.xml -->
1264
- <?xml version =" 1.0" encoding =" UTF-8" ?>
1265
- <container xmlns =" http://symfony.com/schema/dic/services"
1266
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1267
- xmlns : framework =" http://symfony.com/schema/dic/symfony"
1268
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
1269
- https://symfony.com/schema/dic/services/services-1.0.xsd
1270
- http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1271
-
1272
- <framework : config >
1273
- <framework : session enabled =" true"
1274
- handler-id =" redis://localhost"
1275
- handler-id =" %env(REDIS_URL)%"
1276
- handler-id =" %env(resolve:DATABASE_URL)%"
1277
- handler-id =" file://%kernel.project_dir%/var/sessions" />
1278
- </framework : config >
1279
- </container >
1280
-
1281
- .. code-block :: php
1282
-
1283
- // config/packages/framework.php
1284
- $container->loadFromExtension('framework', [
1285
- 'session' => [
1286
- // ...
1287
- 'handler_id' => 'redis://localhost',
1288
- 'handler_id' => '%env(REDIS_URL)%',
1289
- 'handler_id' => '%env(resolve:DATABASE_URL)%',
1290
- 'handler_id' => 'file://%kernel.project_dir%/var/sessions',
1291
- ],
1292
- ]);
1293
-
1294
- .. versionadded :: 4.4
1295
-
1296
- The option to configure the session handler with a DSN was introduced in Symfony 4.4.
1297
-
1298
- If you prefer to make Symfony store sessions in a database read
1299
- :doc: `/doctrine/pdo_session_storage `.
1245
+ let Symfony manage the sessions itself using files to store the session metadata.
1246
+ You can also :doc: `store sessions in a database </session/database >`.
1300
1247
1301
1248
.. _name :
1302
1249
0 commit comments