src/Viserio/Component/Events/DataCollector/TraceableEventManager.php
public function getListenerPriority(string $eventName, $listener): ?int
    {
        // we might have wrapped listeners for the event (if called while dispatching)
        // in that case get the priority by wrapper
        if (isset($this->wrappedListeners[$eventName])) {
            /** @var \Viserio\Component\Events\DataCollector\WrappedListener $wrappedListener */
            foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) {
                if ($wrappedListener->getWrappedListener() === $listener) {
                    return $this->eventManager->getListenerPriority($eventName, $wrappedListener);
                }
            }
        }

        return $this->eventManager->getListenerPriority($eventName, $listener);
    }
public function getListenerPriority(string $eventName, $listener): ?int
    {
        // we might have wrapped listeners for the event (if called while dispatching)
        // in that case get the priority by wrapper
        if (isset($this->wrappedListeners[$eventName])) {
            /** @var \Viserio\Component\Events\DataCollector\WrappedListener $wrappedListener */
            foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) {
                if ($wrappedListener->getWrappedListener() === $listener) {
                    return $this->eventManager->getListenerPriority($eventName, $wrappedListener);
                }
            }
        }

        return $this->eventManager->getListenerPriority($eventName, $listener);
    }
Gets the listener priority for a specific event.

Returns null if the event or the listener does not exist.

@param string         $eventName The name of the event
@param array|callable $listener  The listener

@return null|int The event listener priority

@internal