Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix config syntax
  • Loading branch information
Kleinkind committed Jul 29, 2021
commit d091d8768a1fe6c05d12bc465337e63e1eee543f
12 changes: 1 addition & 11 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1377,9 +1377,6 @@ the used storage-directory or :doc:`store sessions in a database </session/datab
framework:
session:
# ...
handler_id: 'redis://localhost'
handler_id: '%env(REDIS_URL)%'
handler_id: '%env(resolve:DATABASE_URL)%'
handler_id: 'file://%kernel.project_dir%/var/sessions'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


.. code-block:: xml
Expand All @@ -1393,11 +1390,7 @@ the used storage-directory or :doc:`store sessions in a database </session/datab
https://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
<framework:config>
<framework:session enabled="true"
handler-id="redis://localhost"
handler-id="%env(REDIS_URL)%"
handler-id="%env(resolve:DATABASE_URL)%"
handler-id="file://%kernel.project_dir%/var/sessions"/>
<framework:session enabled="true" handler-id="file://%kernel.project_dir%/var/sessions"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<framework:session enabled="true" handler-id="file://%kernel.project_dir%/var/sessions"/>
<framework:session enabled="true"
handler-id="file://%kernel.project_dir%/var/sessions"
/>

</framework:config>
</container>

Expand All @@ -1407,9 +1400,6 @@ the used storage-directory or :doc:`store sessions in a database </session/datab
$container->loadFromExtension('framework', [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use the container configurator as done in other config blocks.

'session' => [
// ...
'handler_id' => 'redis://localhost',
'handler_id' => '%env(REDIS_URL)%',
'handler_id' => '%env(resolve:DATABASE_URL)%',
'handler_id' => 'file://%kernel.project_dir%/var/sessions',
],
]);
Expand Down
16 changes: 3 additions & 13 deletions session/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Besides specifying a service as the session-handler you can also provide a
framework:
session:
# ...
handler_id: 'redis://localhost'
handler_id: '%env(REDIS_URL)%'
handler_id: '%env(resolve:DATABASE_URL)%'
handler_id: 'file://%kernel.project_dir%/var/sessions'
handler_id: 'redis://password@redis-server:6379'

.. code-block:: xml

Expand All @@ -41,11 +38,7 @@ Besides specifying a service as the session-handler you can also provide a
https://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
<framework:config>
<framework:session enabled="true"
handler-id="redis://localhost"
handler-id="%env(REDIS_URL)%"
handler-id="%env(resolve:DATABASE_URL)%"
handler-id="file://%kernel.project_dir%/var/sessions"/>
<framework:session enabled="true" handler-id="redis://password@redis-server:6379"/>
</framework:config>
</container>

Expand All @@ -55,10 +48,7 @@ Besides specifying a service as the session-handler you can also provide a
$container->loadFromExtension('framework', [
'session' => [
// ...
'handler_id' => 'redis://localhost',
'handler_id' => '%env(REDIS_URL)%',
'handler_id' => '%env(resolve:DATABASE_URL)%',
'handler_id' => 'file://%kernel.project_dir%/var/sessions',
'handler_id' => 'redis://password@redis-server:6379',
],
]);

Expand Down