Problem/Motivation

\Drupal\Core\EventSubscriber\ExceptionTestSiteSubscriber::on500() has a todo:

   * @todo The $headers array appears to not actually get used at all in the
   *   original code. It's quite possible that this entire method is now
   *   vestigial and can be removed.

The method builds a $headers array then does nothing with it.

Steps to reproduce

Proposed resolution

Remove the entire event subscriber.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3294076-2.patch2.58 KBlongwave

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new2.58 KB
longwave’s picture

Status: Needs review » Active

This code was ported to an event subscriber in #2323759: Modularize kernel exception handling where the @todo was added, but no followup was ever created.

It seems _drupal_error_header() in errors.inc is responsible for actually sending the X-Drupal-Assertion headers.

longwave’s picture

Status: Active » Needs review
spokje’s picture

Status: Needs review » Reviewed & tested by the community

Nice clean-up.

RTBC for now, and awaiting the outcome of this Slack thread: https://drupal.slack.com/archives/C1BMUQ9U6/p1656933155907629

alexpott’s picture

Version: 10.0.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

There are no classes that extend this and there is nothing using the "service" in contrib. Event listeners are not part of the BC promise so therefore I think we should remove this dead and unused code. Given this has no usages in contrib and is test core and doesn't do anything I'm going to backport to 9.5.x.

Committed and pushed bc8f01f49d to 10.1.x and 1d24002bc9 to 10.0.x and d0ab08fb9e to 9.5.x. Thanks!

  • alexpott committed bc8f01f on 10.1.x
    Issue #3294076 by longwave: Remove unused ExceptionTestSiteSubscriber
    

  • alexpott committed 1d24002 on 10.0.x
    Issue #3294076 by longwave: Remove unused ExceptionTestSiteSubscriber
    
    (...

  • alexpott committed d0ab08f on 9.5.x
    Issue #3294076 by longwave: Remove unused ExceptionTestSiteSubscriber
    
    (...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.