Rationalize & document use of isMasterRequest()-checks in event subscribers

Created on 11 November 2015, about 9 years ago
Updated 28 January 2025, 2 days ago

Problem/Motivation

See #2603788-36: HtmlResponseSubscriber does not call HtmlResponseAttachmentsProcessor on subrequests β†’ and See #2603788-37: HtmlResponseSubscriber does not call HtmlResponseAttachmentsProcessor on subrequests β†’ :

subrequests are just the same like any other request.

I think we also need a follow-up to either remove or comment the other 5 or so calls to isMasterRequest() in the other subscribers. Since #36 argues that "subrequests are just the same like any other request", we should make sure to only treat them differently when there's a clear reason to, and then we need to document that reason.

Proposed resolution

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Closed: outdated

Version

11.0 πŸ”₯

Component

request processing system

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

  • Needs documentation

    A documentation change is requested elsewhere. For Drupal core (and possibly other projects), once the change has been committed, this status should be recorded in a change record node.

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.

  • πŸ‡ΊπŸ‡ΈUnited States lhridley

    It appears that the use of Symfony\Component\HttpKernel\Event\FilterResponseEvent was removed in Drupal 9.0.0, and replaced with Symfony\Component\HttpKernel\Event\ResponseEvent in 9.0+.

    The class, https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Http%21KernelEvent.php/class/KernelEvent/9 appears to be a port of the Symfony 5.3 KernelEvent, with some added code for forward compatibility with Symfony 6.

    This class, Drupal\Core\Http\KernelEvent, was removed from Drupal core with version 10.0.0.

    Since the code in question in this issue has been deprecated and removed from Drupal Core, I'm going to close this issue as outdated.

  • πŸ‡ΊπŸ‡ΈUnited States lhridley
Production build 0.71.5 2024