Audit (and reorganize?) Kernel event listener priorities

Created on 23 June 2015, over 9 years ago
Updated 3 August 2024, 5 months ago

Problem/Motivation

We have been slowly adding listeners to various kernel events over the last 2 years. That's fine, but as event subscribers register their own priority order it's not immediately obvious what the current order is, or if it's optimal.

Proposed resolution

Let's audit all kernel event subscribers and determine if we should rearrange the priority of any of them. In some cases, we may want to also move some post-routing request listeners to the controller event, per http://symfony.com/doc/current/components/http_kernel/introduction.html

After the controller callable has been determined, HttpKernel::handle dispatches the kernel.controller event. Listeners to this event might initialize some part of the system that needs to be initialized after certain things have been determined (e.g. the controller, routing information) but before the controller is executed.

Note: This issue is just about rearranging where certain actions fire. Changing what those listeners are doing is out of scope for this issue (except for syntax changes needed for changing the event, etc.)

Remaining tasks

1) Build a list of all request, controller, view, response, and terminate kernel event listeners/subscribers. That should be included in this issue summary, and potentially in a handbook page later.

2) Determine if we should move any of those listeners, either to change their priority or move some from request to controller.

3) Move anything we decide needs moving.

API changes

Any contrib modules that have a request listener with a sensitive priority MAY need to adjust as a result. However, that in most cases will be a one character change.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Request processingΒ  β†’

Last updated 7 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States Crell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024