From b6d0757992d61be9d28ec02409273e18c83f4899 Mon Sep 17 00:00:00 2001 From: Marichez Pierre Date: Mon, 20 Apr 2015 15:42:28 +0200 Subject: [PATCH 1/3] Fix priority range values for event listeners. According to http://symfony.com/doc/master/reference/dic_tags.html, priority range is from -1024 to +1024. --- cookbook/service_container/event_listener.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index d96f8553a34..433c7a6e262 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -96,7 +96,7 @@ using a special "tag": .. note:: There is an additional tag option ``priority`` that is optional and defaults - to 0. This value can be from -255 to 255, and the listeners will be executed + to 0. This value can be from -1024 to 1024, and the listeners will be executed in the order of their priority (highest to lowest). This is useful when you need to guarantee that one listener is executed before another. From 0912482b89102f120dfcfd7f8bd584c685d23941 Mon Sep 17 00:00:00 2001 From: Marichez Pierre Date: Tue, 21 Apr 2015 10:25:25 +0200 Subject: [PATCH 2/3] Update event_listener.rst Remove priority range. --- cookbook/service_container/event_listener.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index 433c7a6e262..5b8b587ba4b 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -56,7 +56,7 @@ event is just one of the core kernel events:: Each event receives a slightly different type of ``$event`` object. For the ``kernel.exception`` event, it is :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`. To see what type of object each event listener receives, see :class:`Symfony\\Component\\HttpKernel\\KernelEvents`. - +10 .. note:: When setting a response for the ``kernel.request``, ``kernel.view`` or @@ -96,9 +96,8 @@ using a special "tag": .. note:: There is an additional tag option ``priority`` that is optional and defaults - to 0. This value can be from -1024 to 1024, and the listeners will be executed - in the order of their priority (highest to lowest). This is useful when - you need to guarantee that one listener is executed before another. + to 0. The listeners will be executed in the order of their priority (highest to lowest). + This is useful when you need to guarantee that one listener is executed before another. Request Events, Checking Types ------------------------------ From d361f880e7e88eaba3e9aa695a3e6f8c645f7067 Mon Sep 17 00:00:00 2001 From: Marichez Pierre Date: Tue, 21 Apr 2015 10:25:57 +0200 Subject: [PATCH 3/3] Update event_listener.rst Fix typo. --- cookbook/service_container/event_listener.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index 5b8b587ba4b..0d7bce7935a 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -56,7 +56,7 @@ event is just one of the core kernel events:: Each event receives a slightly different type of ``$event`` object. For the ``kernel.exception`` event, it is :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`. To see what type of object each event listener receives, see :class:`Symfony\\Component\\HttpKernel\\KernelEvents`. -10 + .. note:: When setting a response for the ``kernel.request``, ``kernel.view`` or