Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Configuration
* `cookie_lifetime`_
* `cookie_path`_
* `cookie_secure`_
* :ref:`enabled <reference-session-enabled>`
* `gc_divisor`_
* `gc_maxlifetime`_
* `gc_probability`_
Expand Down Expand Up @@ -959,6 +960,49 @@ session persists.
Starting in Symfony 3.4, session data is *only* written when the session data has
changed. Previously, you needed to set this option to avoid that behavior.

.. _reference-session-enabled:

enabled
.......

**type**: ``boolean`` **default**: ``true``

Whether to enable the session support in the framework.

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
framework:
session:
enabled: true

.. code-block:: xml

<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config>
<framework:session enabled="true" />
</framework:config>
</container>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('framework', array(
'session' => array(
'enabled' => true,
),
));

assets
~~~~~~

Expand Down