Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0bfe906

Browse filesBrowse files
mtarldHeahDude
andauthored
Apply suggestions from code review
Co-Authored-By: Jules Pietri <heahdude@yahoo.fr>
1 parent eb9de96 commit 0bfe906
Copy full SHA for 0bfe906

File tree

1 file changed

+7
-6
lines changed
Filter options

1 file changed

+7
-6
lines changed

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,8 +1810,8 @@ with a locale. This can be done by defining a different prefix for each locale
18101810
Stateless Routes
18111811
----------------
18121812

1813-
Routes can configure a ``stateless`` boolean option in order to make sure that the controller
1814-
is not using the session during the request handling.
1813+
Routes can configure a ``stateless`` boolean option in order to make sure that
1814+
the session won't ever be used when matching a request:
18151815

18161816
.. configuration-block::
18171817

@@ -1857,7 +1857,7 @@ is not using the session during the request handling.
18571857
18581858
// config/routes.php
18591859
use App\Controller\MainController;
1860-
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
1860+
use Symfony\Bundle\FrameworkBundle\Routing\Loader\Configurator\RoutingConfigurator;
18611861
18621862
return function (RoutingConfigurator $routes) {
18631863
$routes->add('homepage', '/')
@@ -1866,9 +1866,10 @@ is not using the session during the request handling.
18661866
;
18671867
};
18681868
1869-
If a stateless declared route is using the session, the application will:
1870-
- Throw an `Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException` when debugging is enabled
1871-
- Log a warning when debugging is disabled.
1869+
Now, if the session is used, the application will report it based on your
1870+
``kernel.debug`` parameter:
1871+
* ``enabled``: will throw an :class:`Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException` exception
1872+
* ``disabled``: will log a warning
18721873

18731874
.. tip::
18741875

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.