public function addListenerService($eventName, $callback, $priority = 0) { if (!is_array($callback) || 2 !== count($callback)) { throw new \InvalidArgumentException('Expected an array("service", "method") argument'); } $bundle = $this->kernel->getBundleByServiceId($callback[0]); // skip inactive module bundles if (!$bundle || !$bundle instanceof AbstractModule || $bundle instanceof AbstractModule && $this->kernel->isModuleBundleActive($bundle)) { parent::addListenerService($eventName, $callback, $priority); } }