From 506cffdc03a85732a8fea3a870b53b78683d9790 Mon Sep 17 00:00:00 2001 From: Stepan Anchugov Date: Tue, 26 Jan 2016 23:18:33 +0500 Subject: [PATCH 01/11] Typofix for "Defining and Processing Configuration Values" Just several typos fixed. --- components/config/definition.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index e8eb49e2594..e9d8787fc76 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -238,7 +238,7 @@ Or the following XML configuration: .. code-block:: xml - msyql + mysql sqlite The processed configuration is:: @@ -341,7 +341,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 From bf5de47a8940ae59efe8451cdd65ec93317727eb Mon Sep 17 00:00:00 2001 From: Grzegorz Balcewicz Date: Thu, 14 Jan 2016 19:18:05 +0100 Subject: [PATCH 02/11] Update templating.rst | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 3.0+ | Fixed tickets | N/A Fixed the description of using absolute_url for the asset. --- book/templating.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/templating.rst b/book/templating.rst index bb41b86ef55..08b90ff9186 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1091,7 +1091,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:: From 41608b0fdb75dbc4b2340ae1e6d9cad8443185e8 Mon Sep 17 00:00:00 2001 From: Raul C Date: Wed, 27 Jan 2016 21:23:39 +0100 Subject: [PATCH 03/11] Added the missing namespace in example of a subscriber class --- components/event_dispatcher/introduction.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 6e0a9ae3e3a..8279d679c0b 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 { From 5ec684110c0ce53bbc896832daa39d14efcacb2c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 27 Jan 2016 19:45:15 +0100 Subject: [PATCH 04/11] fix MongoDB shell syntax highlighting --- cookbook/doctrine/mongodb_session_storage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } ) From aad2b89117634e530e8c4cdbd51c42a8ce1d0c4c Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Thu, 21 Jan 2016 12:36:59 +0100 Subject: [PATCH 05/11] Missing reference docs for kernel.finish_request event --- reference/events.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/reference/events.rst b/reference/events.rst index d596cab0947..40962ea2cf7 100644 --- a/reference/events.rst +++ b/reference/events.rst @@ -158,6 +158,35 @@ 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:: + + 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`` ~~~~~~~~~~~~~~~~~~~~ From 739e23a90069b7ac68edb1ad58fae7f9f4e2b9f4 Mon Sep 17 00:00:00 2001 From: Loupasakis Kostas Date: Wed, 13 Jan 2016 13:48:04 +0200 Subject: [PATCH 06/11] Docs do not match functionality --- cookbook/bundles/configuration.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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``. From ab2f9aa37c6e354686b1265f3520ac337d34e754 Mon Sep 17 00:00:00 2001 From: Vladimir Kovpak Date: Fri, 29 Jan 2016 17:44:53 +0200 Subject: [PATCH 07/11] Expected: semicolon Added missed semicolon. --- cookbook/security/api_key_authentication.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/api_key_authentication.rst b/cookbook/security/api_key_authentication.rst index ee721e4894f..5ed3b0ef133 100644 --- a/cookbook/security/api_key_authentication.rst +++ b/cookbook/security/api_key_authentication.rst @@ -308,7 +308,7 @@ you can use to create an error ``Response``. // this contains information about *why* authentication failed // use it, or return your own message strtr($exception->getMessageKey(), $exception->getMessageData()) - , 403) + , 403); } } From 50c3fb25db39fb53d21db4095c60a1325b30c712 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 29 Jan 2016 17:33:24 +0100 Subject: [PATCH 08/11] [#6204] fix CS --- cookbook/security/api_key_authentication.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbook/security/api_key_authentication.rst b/cookbook/security/api_key_authentication.rst index 5ed3b0ef133..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 + ); } } From 291dc5acb6c8232bd96f9583d7625ed0b1a704b8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 27 Jan 2016 16:25:39 +0100 Subject: [PATCH 09/11] Document the invalidate_session option --- reference/configuration/security.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index e400ab003a2..53cdb436b5d 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -319,6 +319,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 -------------------------------------------- From c0d2bac0c2b09274bc005d516aa6f876ae2e8351 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 30 Jan 2016 22:40:07 +0100 Subject: [PATCH 10/11] [#6191] fix build --- reference/configuration/security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 53cdb436b5d..13be9393268 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -323,7 +323,7 @@ Logout Configuration -------------------- invalidate_session -.................. +~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` From 4cf2d0b609d8a15546c48b9326e4b4d1b07d06fe Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 30 Jan 2016 22:50:17 +0100 Subject: [PATCH 11/11] [#6174] tweak the event description --- reference/events.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reference/events.rst b/reference/events.rst index 40962ea2cf7..800c47039d1 100644 --- a/reference/events.rst +++ b/reference/events.rst @@ -163,8 +163,10 @@ Listener Class Name **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:: +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) {