-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
GetResponse*Events stop after a response was set #4532
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
Changes from 1 commit
25e1069
d13943a
e729750
bebce0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,9 +59,9 @@ event is just one of the core kernel events:: | |
|
||
.. note:: | ||
|
||
When setting a response for the ``kernel.view`` or ``kernel.exception`` | ||
events, the propagation is stopped, so the lower priority listeners on | ||
that event don't get called. | ||
When setting a response for the ``kernel.request``, ``kernel.view`` and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldnt this "or" instead oft "and"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't so. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact if you set it for kernel.request kernel.view won't even be triggered, and kernel.exception is exclusive with kernel.view (and is triggered after kernel.request) so I thought and was better. Also, I'm refering to the set of the 3 events. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it's due to how you would write this in german by I agree with @timglabisch here that "or" sounds more correct. What do you think about rewording this a bit to make it more clear (sadly, I don't have a good idea right now). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, in german "or" would be more natural.
you dont have to set kernel.request AND kernel.view AND ...., it's more like this is true for kernel.request || kernel.view | | ... :) but "and" sounds ok for me, too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should indeed be OR. The event has to be either kernel.request, kernel.view or kernel.exception. It can't be kernel.request AND kernel.view AND kernel.exception at the same time, it's one of them. (but well, this is a very high technical view on this topic, I think both are ok to use) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree - should be OR - I've got it changed at sha: 5842f5c Thanks! |
||
``kernel.exception`` events, the propagation is stopped, so the lower | ||
priority listeners on that event don't get called. | ||
|
||
Now that the class is created, you just need to register it as a service and | ||
notify Symfony that it is a "listener" on the ``kernel.exception`` event by | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might cause some confusion. What about: "When setting a response for the
kernel.view
event, the propagation is stopped. This means listeners with lower priority won't be executed."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A full stop makes more sense to separate the two concepts. I'll change it.