Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Document the kernel.reset tag #11055

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
Feb 27, 2019
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
Diff view
16 changes: 16 additions & 0 deletions 16 reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Tag Name Usage
`kernel.event_listener`_ Listen to different events/hooks in Symfony
`kernel.event_subscriber`_ To subscribe to a set of different events/hooks in Symfony
`kernel.fragment_renderer`_ Add new HTTP content rendering strategies
`kernel.reset`_ Allows to clean up services between requests
`monolog.logger`_ Logging with a custom logging channel
`monolog.processor`_ Add a custom processor for logging
`routing.loader`_ Register a custom service that loads routes
Expand Down Expand Up @@ -632,6 +633,21 @@ To add a new rendering strategy - in addition to the core strategies like
:class:`Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface`,
register it as a service, then tag it with ``kernel.fragment_renderer``.

kernel.reset
------------

**Purpose**: Clean up services between requests

During the ``kernel.terminate`` event, Symfony looks for any service tagged
with the ``kernel.reset`` tag to reinitialize their state. This is done by
calling to the method whose name is configured in the ``method`` argument of
the tag.

This is mostly useful when running your projects in application servers that
reuse the Symfony application between requests to improve performance. This tag
is applied for example to the built-in :doc:`data collectors </profiler/data_collector>`
of the profiler to delete all their information.

.. _dic_tags-monolog:

monolog.logger
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.