Skip to content

Commit 53726dd

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [#6174] tweak the event description [#6191] fix build Document the invalidate_session option Docs do not match functionality Missing reference docs for kernel.finish_request event fix MongoDB shell syntax highlighting Added the missing namespace in example of a subscriber class Update templating.rst Typofix for "Defining and Processing Configuration Values"
2 parents 50c3fb2 + c0d1ed1 commit 53726dd

File tree

7 files changed

+54
-6
lines changed

7 files changed

+54
-6
lines changed

book/templating.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ If you don't give a version or pass ``null``, the default package version
10981098
(from :ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
10991099
versioned URL will be deactivated for this asset.
11001100

1101-
If you need absolute URLs for assets, you can set the ``absolute`` argument
1101+
If you need absolute URLs for assets, you can use the ``absolute_url`` function
11021102
if you are using Twig (or the third argument if you are using PHP) to ``true``:
11031103

11041104
.. configuration-block::

components/config/definition.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Or the following XML configuration:
231231

232232
.. code-block:: xml
233233
234-
<driver>msyql</driver>
234+
<driver>mysql</driver>
235235
<driver>sqlite</driver>
236236
237237
The processed configuration is::
@@ -334,7 +334,7 @@ In order to maintain the array keys use the ``useAttributeAsKey()`` method::
334334

335335
The argument of this method (``name`` in the example above) defines the name of
336336
the attribute added to each XML node to differentiate them. Now you can use the
337-
same YAML configuration showed before or the following XML configuration:
337+
same YAML configuration shown before or the following XML configuration:
338338

339339
.. code-block:: xml
340340

components/event_dispatcher/introduction.rst

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ subscribes to the ``kernel.response`` and ``store.order`` events::
393393

394394
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
395395
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
396+
use Acme\StoreBundle\Event\FilterOrderEvent;
396397

397398
class StoreSubscriber implements EventSubscriberInterface
398399
{

cookbook/bundles/configuration.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ The ``config:dump-reference`` command dumps the default configuration of a
294294
bundle in the console using the Yaml format.
295295

296296
As long as your bundle's configuration is located in the standard location
297-
(``YourBundle\DependencyInjection\Configuration``) and does not require
298-
arguments to be passed to the constructor it will work automatically. If you
297+
(``YourBundle\DependencyInjection\Configuration``) and does not have
298+
a constructor it will work automatically. If you
299299
have something different, your ``Extension`` class must override the
300300
:method:`Extension::getConfiguration() <Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension::getConfiguration>`
301301
method and return an instance of your ``Configuration``.

cookbook/doctrine/mongodb_session_storage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Because MongoDB uses dynamic collection schemas, you do not need to do anything
162162
session collection. However, you may want to add an index to improve garbage collection performance.
163163
From the `MongoDB shell`_:
164164

165-
.. code-block:: text
165+
.. code-block:: javascript
166166
167167
use session_db
168168
db.session.ensureIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )

reference/configuration/security.rst

+16
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,22 @@ Redirecting after Login
329329

330330
.. _reference-security-pbkdf2:
331331

332+
Logout Configuration
333+
--------------------
334+
335+
invalidate_session
336+
~~~~~~~~~~~~~~~~~~
337+
338+
**type**: ``boolean`` **default**: ``true``
339+
340+
By default, when users log out from any firewall, their sessions are invalidated.
341+
This means that logging out from one firewall automatically logs them out from
342+
all the other firewalls.
343+
344+
The ``invalidate_session`` option allows to redefine this behavior. Set this
345+
option to ``false`` in every firewall and the user will only be logged out from
346+
the current firewall and not the other ones.
347+
332348
Using the PBKDF2 Encoder: Security and Speed
333349
--------------------------------------------
334350

reference/events.rst

+31
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,37 @@ Listener Class Name
158158
:class:`Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener` -1024
159159
=================================================================================== ========
160160

161+
``kernel.finish_request``
162+
~~~~~~~~~~~~~~~~~~~~~~~~~
163+
164+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent`
165+
166+
The purpose of this event is to allow you to reset the global and environmental
167+
state of the application after a sub-request has finished (for example, the
168+
translator listener resets the translator's locale to the one of the parent
169+
request)::
170+
171+
public function onKernelFinishRequest(FinishRequestEvent $event)
172+
{
173+
if (null === $parentRequest = $this->requestStack->getParentRequest()) {
174+
return;
175+
}
176+
177+
//Reset the locale of the subrequest to the locale of the parent request
178+
$this->setLocale($parentRequest);
179+
}
180+
181+
These are the built-in Symfony listeners related to this event:
182+
183+
========================================================================== ========
184+
Listener Class Name Priority
185+
========================================================================== ========
186+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener` 0
187+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener` 0
188+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\RouterListener` 0
189+
:class:`Symfony\\Component\\Security\\Http\\Firewall` 0
190+
========================================================================== ========
191+
161192
``kernel.terminate``
162193
~~~~~~~~~~~~~~~~~~~~
163194

0 commit comments

Comments
 (0)