Skip to content

[Session] Update session.rst v4.4 #16478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2022
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
20 changes: 10 additions & 10 deletions session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ sessions, check their default configuration:

# config/packages/framework.yaml
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:
# enables the support of sessions in the app
enabled: true
# ID of the service used for session storage.
# ID of the service used for session storage
# NULL means that Symfony uses PHP default session mechanism
handler_id: null
# improves the security of the cookies used for sessions
cookie_secure: 'auto'
cookie_samesite: 'lax'
cookie_secure: auto
cookie_samesite: lax

.. code-block:: xml

Expand All @@ -40,13 +40,13 @@ sessions, check their default configuration:

<framework:config>
<!--
enabled: enables the support of sessions in the app
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.
handler-id: ID of the service used for session storage
NULL means that Symfony uses PHP default session mechanism
cookie-secure and cookie-samesite: improves the security of the cookies used for sessions
-->
<framework:session enabled="true"
handler-id="null"
<framework:session handler-id="null"
cookie-secure="auto"
cookie-samesite="lax"/>
</framework:config>
Expand All @@ -56,9 +56,9 @@ sessions, check their default configuration:

// config/packages/framework.php
$container->loadFromExtension('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' => [
// enables the support of sessions in the app
'enabled' => true,
// ID of the service used for session storage
// NULL means that Symfony uses PHP default session mechanism
'handler_id' => null,
Expand Down