8000 [Components][HttpKernel] outline implications of the kernel.terminate event by xabbuh · Pull Request #4224 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
10 changes: 10 additions & 0 deletions components/http_kernel/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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