Unverified Commit d3150acb authored by Geoff Appleby's avatar Geoff Appleby
Browse files

Issue #3289327: Drupal 10 Compatibility

parent 9a3229a8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
name: Reporting
type: module
description: Provide Reporting API endpoints
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9 || ^10
configure: entity.reporting_endpoint.collection
+7 −7
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Drupal\reporting\EventSubscriber;

use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Drupal\Component\Plugin\Exception\PluginException;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheBackendInterface;
@@ -9,7 +10,6 @@ use Drupal\Core\Entity\EntityMalformedException;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\reporting\ReportingResponse;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;

/**
@@ -62,11 +62,11 @@ class ResponseSubscriber implements EventSubscriberInterface {
  /**
   * Prevent other response event listeners from altering reporting responses.
   *
   * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
   * @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
   *   The response event.
   */
  public function reportingResponses(FilterResponseEvent $event) {
    if (!$event->isMasterRequest()) {
  public function reportingResponses(ResponseEvent $event) {
    if (!$event->isMainRequest()) {
      return;
    }

@@ -78,11 +78,11 @@ class ResponseSubscriber implements EventSubscriberInterface {
  /**
   * Add report-to header to the response.
   *
   * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
   * @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
   *   The response event.
   */
  public function addReportToHeader(FilterResponseEvent $event) {
    if (!$event->isMasterRequest()) {
  public function addReportToHeader(ResponseEvent $event) {
    if (!$event->isMainRequest()) {
      return;
    }