Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Nov 2022 at 17:13 UTC
Updated:
25 Jan 2023 at 04:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chi commentedComment #3
cyberwolf commentedI added a check if the method is callable in the attached patch. Currently in D9 the included Symfony/EventDispatcher module's Event class (extended by Drupal\Component\EventDispatcher\Event) does not implement this newer interface yet, so using the interface is not an option (yet).
Comment #4
chi commented@Cyberwolf The issue is for Drupal 10. So we can safely check
StoppableEventInterface.I think, it's Ok to have a different patch for Drupal 9.
Comment #5
longwaveShould we do #2909185: Replace ContainerAwareEventDispatcher with Symfony EventDispatcher instead?
Comment #6
chi commented@longway, I think we should not.
This one is a bug that is trivial to fix while #2909185 is a task that might not be ever resolved.
Comment #7
longwaveThe patch needs work for #4 first (we can consider backporting to 9.x later) and also needs test coverage to ensure we don't break it again.
Comment #8
cyberwolf commentedAttaching a patch for Drupal 10 including a test.
Comment #9
cyberwolf commentedComment #10
cyberwolf commentedComment #11
chi commentedI think this line deserves a comment explaining what exactly is testing there.
Also I propose we move checking for
StoppableEventInterfaceout of double loop.Comment #12
cyberwolf commentedThanks for the feedback, I will try to process it today.
Comment #13
cyberwolf commentedComment #14
cyberwolf commentedComment #16
chi commentedThank you.
Comment #17
alexpottCommitted and pushed 17fa174546 to 10.1.x and e5fbc65128 to 10.0.x.
This bugfix is not relevant for 9.5.x as there is an event class does not use StoppableEventInterface in quite the same way - and there Event classes that don't use it at all.
Comment #21
quietone commentedRemoving tag because a test was added.