Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0bfe906

Browse files
mtarldHeahDude
andauthored
Apply suggestions from code review
Co-Authored-By: Jules Pietri <heahdude@yahoo.fr>
1 parenteb9de96 commit0bfe906

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎routing.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp