Skip to content

PostResponseEvent not extending KernelEvent #16342

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
thedamnedrhino opened this issue Oct 26, 2015 · 3 comments
Closed

PostResponseEvent not extending KernelEvent #16342

thedamnedrhino opened this issue Oct 26, 2015 · 3 comments

Comments

@thedamnedrhino
Copy link

According to the official docs all Kernel Events should extend KernelEvent but PostResponseEvent doesn't.
I also have a valid use case for it, which follows:
I'm storing the last accessed page by the user in the session, so I've registered a listener on kernel.terminate for that, but the request's info should only be stored, if it's a master request, however without thePostResponseEvent extending KernelEvent I have no way of knowing that.

@jakzal
Copy link
Contributor

jakzal commented Oct 28, 2015

kernel.terminate is only dispatched on master requests.

@Tobion
Copy link
Contributor

Tobion commented Oct 28, 2015

Closing for the reason provided by @jakzal. If the documentation needs clarification about this, please open an issue on symfony-docs.

@jakzal
Copy link
Contributor

jakzal commented Nov 2, 2015

I still think we should fix this, at least for consistency (see #16430).

fabpot added a commit that referenced this issue Nov 4, 2015
…lEvent (jakzal)

This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] PostResponseEvent should extend the KernelEvent

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16342
| License       | MIT
| Doc PR        | -

Technically the `PostResponseEvent` is a `KernelEvent`.

Commits
-------

b9863d5 [HttpKernel] PostResponseEvent should extend the KernelEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants