Skip to content

Commit 1bb1a95

Browse files
committed
Merge branch '3.0'
* 3.0: [#6174] tweak the event description [#6191] fix build Document the invalidate_session option [#6204] fix CS Expected: semicolon 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" Latest demo has no bin folder
2 parents 4dc197a + beb0d3a commit 1bb1a95

File tree

9 files changed

+58
-9
lines changed

9 files changed

+58
-9
lines changed

book/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ of the Symfony Installer anywhere in your system:
343343
c:\projects\> php symfony demo
344344
345345
Once downloaded, enter into the ``symfony_demo/`` directory and run the PHP's
346-
built-in web server executing the ``php bin/console server:run`` command. Access
346+
built-in web server executing the ``php app/console server:run`` command. Access
347347
to the ``http://localhost:8000`` URL in your browser to start using the Symfony
348348
Demo application.
349349

book/templating.rst

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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 } )

cookbook/security/api_key_authentication.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,9 @@ you can use to create an error ``Response``.
307307
return new Response(
308308
// this contains information about *why* authentication failed
309309
// use it, or return your own message
310-
strtr($exception->getMessageKey(), $exception->getMessageData())
311-
, 403)
310+
strtr($exception->getMessageKey(), $exception->getMessageData()),
311+
403
312+
);
312313
}
313314
}
314315

reference/configuration/security.rst

Lines changed: 16 additions & 0 deletions
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

Lines changed: 31 additions & 0 deletions
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)