Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
* 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"
  • Loading branch information
xabbuh committed Jan 30, 2016
2 parents 50c3fb2 + c0d1ed1 commit 53726dd
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 6 deletions.
2 changes: 1 addition & 1 deletion book/templating.rst
Expand Up @@ -1098,7 +1098,7 @@ If you don't give a version or pass ``null``, the default package version
(from :ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
versioned URL will be deactivated for this asset.

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

.. configuration-block::
Expand Down
4 changes: 2 additions & 2 deletions components/config/definition.rst
Expand Up @@ -231,7 +231,7 @@ Or the following XML configuration:

.. code-block:: xml
<driver>msyql</driver>
<driver>mysql</driver>
<driver>sqlite</driver>
The processed configuration is::
Expand Down Expand Up @@ -334,7 +334,7 @@ In order to maintain the array keys use the ``useAttributeAsKey()`` method::

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

.. code-block:: xml
Expand Down
1 change: 1 addition & 0 deletions components/event_dispatcher/introduction.rst
Expand Up @@ -393,6 +393,7 @@ subscribes to the ``kernel.response`` and ``store.order`` events::

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Acme\StoreBundle\Event\FilterOrderEvent;

class StoreSubscriber implements EventSubscriberInterface
{
Expand Down
4 changes: 2 additions & 2 deletions cookbook/bundles/configuration.rst
Expand Up @@ -294,8 +294,8 @@ The ``config:dump-reference`` command dumps the default configuration of a
bundle in the console using the Yaml format.

As long as your bundle's configuration is located in the standard location
(``YourBundle\DependencyInjection\Configuration``) and does not require
arguments to be passed to the constructor it will work automatically. If you
(``YourBundle\DependencyInjection\Configuration``) and does not have
a constructor it will work automatically. If you
have something different, your ``Extension`` class must override the
:method:`Extension::getConfiguration() <Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension::getConfiguration>`
method and return an instance of your ``Configuration``.
Expand Down
2 changes: 1 addition & 1 deletion cookbook/doctrine/mongodb_session_storage.rst
Expand Up @@ -162,7 +162,7 @@ Because MongoDB uses dynamic collection schemas, you do not need to do anything
session collection. However, you may want to add an index to improve garbage collection performance.
From the `MongoDB shell`_:

.. code-block:: text
.. code-block:: javascript
use session_db
db.session.ensureIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )
Expand Down
16 changes: 16 additions & 0 deletions reference/configuration/security.rst
Expand Up @@ -329,6 +329,22 @@ Redirecting after Login

.. _reference-security-pbkdf2:

Logout Configuration
--------------------

invalidate_session
~~~~~~~~~~~~~~~~~~

**type**: ``boolean`` **default**: ``true``

By default, when users log out from any firewall, their sessions are invalidated.
This means that logging out from one firewall automatically logs them out from
all the other firewalls.

The ``invalidate_session`` option allows to redefine this behavior. Set this
option to ``false`` in every firewall and the user will only be logged out from
the current firewall and not the other ones.

Using the PBKDF2 Encoder: Security and Speed
--------------------------------------------

Expand Down
31 changes: 31 additions & 0 deletions reference/events.rst
Expand Up @@ -158,6 +158,37 @@ Listener Class Name
:class:`Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener` -1024
=================================================================================== ========

``kernel.finish_request``
~~~~~~~~~~~~~~~~~~~~~~~~~

**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent`

The purpose of this event is to allow you to reset the global and environmental
state of the application after a sub-request has finished (for example, the
translator listener resets the translator's locale to the one of the parent
request)::

public function onKernelFinishRequest(FinishRequestEvent $event)
{
if (null === $parentRequest = $this->requestStack->getParentRequest()) {
return;
}

//Reset the locale of the subrequest to the locale of the parent request
$this->setLocale($parentRequest);
}

These are the built-in Symfony listeners related to this event:

========================================================================== ========
Listener Class Name Priority
========================================================================== ========
:class:`Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener` 0
:class:`Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener` 0
:class:`Symfony\\Component\\HttpKernel\\EventListener\\RouterListener` 0
:class:`Symfony\\Component\\Security\\Http\\Firewall` 0
========================================================================== ========

``kernel.terminate``
~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 53726dd

Please sign in to comment.