/**
* @param callable $listener can not use native type declaration @see https://github.com/symfony/symfony/issues/42283
*/
public function addListener(string
$eventName,
$listener, int
$priority = 0
): void // @phpstan-ignore-line
{ /** @var callable(object): void $listener - Specify generic callback interface callers can provide more specific implementations */
$this->dispatcher->
addListener($eventName,
$listener,
$priority);
} public function addSubscriber(EventSubscriberInterface
$subscriber): void
{ $this->dispatcher->
addSubscriber($subscriber);
} public function removeListener(string
$eventName, callable
$listener): void
{ /** @var callable(object): void $listener - Specify generic callback interface callers can provide more specific implementations */
$this->dispatcher->
removeListener($eventName,
$listener);
} public function removeSubscriber(EventSubscriberInterface
$subscriber): void
{ $this->dispatcher->
removeSubscriber($subscriber);
}