Permalink
Browse files

feature #4224 [Components][HttpKernel] outline implications of the ke…

…rnel.terminate event (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Components][HttpKernel] outline implications of the kernel.terminate event

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | #4198

Commits
-------

c4f4588 outline implications of the kernel.terminate event
  • Loading branch information...
weaverryan committed Oct 19, 2014
2 parents d3b5ba2 + c4f4588 commit 8dc90efdff19a00c55ee0be187866b1f97c0b16f
Showing with 10 additions and 0 deletions.
  1. +10 −0 components/http_kernel/introduction.rst
@@ -472,6 +472,15 @@ you will trigger the ``kernel.terminate`` event where you can perform certain
actions that you may have delayed in order to return the response as quickly
as possible to the client (e.g. sending emails).
.. caution::
Internally, the HttpKernel makes use of the :phpfunction:`fastcgi_finish_request`
PHP function. This means that at the moment, only the `PHP FPM`_ server
API is able to send a response to the client while the server's PHP process
still performs some tasks. With all other server APIs, listeners to ``kernel.terminate``
are still executed, but the response is not sent to the client until they
are all completed.
.. note::
Using the ``kernel.terminate`` event is optional, and should only be
@@ -689,3 +698,4 @@ look like this::
.. _reflection: http://php.net/manual/en/book.reflection.php
.. _FOSRestBundle: https://github.com/friendsofsymfony/FOSRestBundle
.. _`Create your own framework... on top of the Symfony2 Components`: http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1
.. _`PHP FPM`: http://php.net/manual/en/install.fpm.php

0 comments on commit 8dc90ef

Please sign in to comment.