diff --git a/book/templating.rst b/book/templating.rst index 52963f0b1fb..a7fc74af5cc 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -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:: diff --git a/components/config/definition.rst b/components/config/definition.rst index bd482f47ed8..b2a714d5cdc 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -231,7 +231,7 @@ Or the following XML configuration: .. code-block:: xml - msyql + mysql sqlite The processed configuration is:: @@ -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 diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 8a5b678cc95..21a96b34018 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -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 { diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index 7d902e1c56e..fed4e5c20eb 100644 --- a/cookbook/bundles/configuration.rst +++ b/cookbook/bundles/configuration.rst @@ -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() ` method and return an instance of your ``Configuration``. diff --git a/cookbook/doctrine/mongodb_session_storage.rst b/cookbook/doctrine/mongodb_session_storage.rst index f4669e936a3..0d5b1df2444 100644 --- a/cookbook/doctrine/mongodb_session_storage.rst +++ b/cookbook/doctrine/mongodb_session_storage.rst @@ -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 } ) diff --git a/cookbook/security/api_key_authentication.rst b/cookbook/security/api_key_authentication.rst index ee721e4894f..cc405446b01 100644 --- a/cookbook/security/api_key_authentication.rst +++ b/cookbook/security/api_key_authentication.rst @@ -307,8 +307,9 @@ you can use to create an error ``Response``. return new Response( // this contains information about *why* authentication failed // use it, or return your own message - strtr($exception->getMessageKey(), $exception->getMessageData()) - , 403) + strtr($exception->getMessageKey(), $exception->getMessageData()), + 403 + ); } } diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 567c3b94ce2..11f3d2ec432 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -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 -------------------------------------------- diff --git a/reference/events.rst b/reference/events.rst index d596cab0947..800c47039d1 100644 --- a/reference/events.rst +++ b/reference/events.rst @@ -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`` ~~~~~~~~~~~~~~~~~~~~