Skip to content

Fixed event listeners priority #3719

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

Closed
Closed
Changes from 3 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
20 changes: 17 additions & 3 deletions reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,23 @@ To register your warmer with Symfony, give it the ``kernel.cache_warmer`` tag:
->addTag('kernel.cache_warmer', array('priority' => 0))
;

The ``priority`` value is optional, and defaults to 0. This value can be
from -255 to 255, and the warmers will be executed in the order of their
priority.
.. note::

The ``priority`` value is optional, and defaults to 0.
The higher the priority, the sooner it gets executed.

kernel.cache_warmer
..............
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be something like:

Core Cache Warmers
..................

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, it's fixed. I kept the tag name for consistency with the rest of the tables below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest of the tables below refer to event names, not the tag names. Since cache warmers aren't event, they should not be treated the same


+-------------------------------------------------------------------------------------------+-----------+
| Cache Warmer Class Name | Priority |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TemplatePathsCacheWarmer` | 20 |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer` | 0 |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheCacheWarmer` | 0 |
+-------------------------------------------------------------------------------------------+-----------+

.. _dic-tags-kernel-event-listener:

Expand Down