From 02b8dec569f5710c674ff8b23f6a59245ba4de9d Mon Sep 17 00:00:00 2001
From: Stephen Mustgrave <38930-smustgrave@users.noreply.drupalcode.org>
Date: Sat, 17 Jun 2023 15:59:06 +0000
Subject: [PATCH] Issue #3366260: Broken event dispatching in Drupal 10

---
 src/EventSubscriber/StageFileProxySubscriber.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/EventSubscriber/StageFileProxySubscriber.php b/src/EventSubscriber/StageFileProxySubscriber.php
index d3ed6d1..1ae4153 100644
--- a/src/EventSubscriber/StageFileProxySubscriber.php
+++ b/src/EventSubscriber/StageFileProxySubscriber.php
@@ -123,7 +123,7 @@ class StageFileProxySubscriber implements EventSubscriberInterface {
     }
 
     $alter_excluded_paths_event = new AlterExcludedPathsEvent([]);
-    $this->eventDispatcher->dispatch('stage_file_proxy.alter_excluded_paths', $alter_excluded_paths_event);
+    $this->eventDispatcher->dispatch($alter_excluded_paths_event, 'stage_file_proxy.alter_excluded_paths');
     $excluded_paths = $alter_excluded_paths_event->getExcludedPaths();
     foreach ($excluded_paths as $excluded_path) {
       if (strpos($request_path, $excluded_path) !== FALSE) {
-- 
GitLab