src/Event/EventManager.php
public function removeSubscriber(EventSubscriberInterface $subscriber)
	{
		foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
			if (\is_array($params) && \is_array($params[0])) {
				foreach ($params as $listener) {
					$this->detach($eventName, [$subscriber, $listener[0]]);
				}
			} else {
				$this->detach($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
			}
		}

		return $this;
	}
public function removeSubscriber(EventSubscriberInterface $subscriber)
	{
		foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
			if (\is_array($params) && \is_array($params[0])) {
				foreach ($params as $listener) {
					$this->detach($eventName, [$subscriber, $listener[0]]);
				}
			} else {
				$this->detach($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
			}
		}

		return $this;
	}
public function removeSubscriber ( EventSubscriberInterface $ subscriber ) { foreach ( $ subscriber -> getSubscribedEvents ( ) as $ eventName => $ params ) { if ( \ is_array ( $ params ) && \ is_array ( $ params [ 0 ] ) ) { foreach ( $ params as $ listener ) { $ this -> detach ( $ eventName , [ $ subscriber , $ listener [ 0 ] ] ) ; } } else { $ this -> detach ( $ eventName , [ $ subscriber , \ is_string ( $ params ) ? $ params : $ params [ 0 ] ] ) ; } } return $ this ; }
Removes an event subscriber.

@param EventSubscriberInterface $subscriber The subscriber

@return $this
Removes an event subscriber .