public function addSubscriber(EventSubscriber $eventSubscriber)
    {
        $listeners = $eventSubscriber->getEvents();

        foreach($listeners as $listener => $data)
        {
            if (is_array($data)) {
                $data = new SubscriberConfiguration($data[0], $data[1] ?? self::USE_ALL, $data[2] ?? 100);
            }

            if (!$data instanceof SubscriberConfiguration) {
                throw new \InvalidArgumentException(
                    'SubscriberConfiguration for ' . $listener . ' in ' . get_class($eventSubscriber) . ' is invalid!'
                );
            }

            // horrible hack due to array not being a callable in this case ... whut?
            $listenerCallable = function($events) use ($eventSubscriber, $listener) {
                $eventSubscriber->{$listener}($events);
            };

            $this->addWeightedListener(
                $listenerCallable,
                $data->getUseType(),
                $data->getWeight(),
                ...$data->getEvents()
            );
        }
    }