Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-12016

Event listeners should be services

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.1.0-a2
    • 3.1.0-a1
    • Events
    • None

      They should either be provided from a provider, or we should check whether there is a service available for that class, instead of creating the instance ourselves.
      Current code:

      		foreach ($subscriber_classes as $class)
      		{
      			$subscriber = new $class();
      			$this->dispatcher->addSubscriber($subscriber);
      		}

            nickvergessen Joas Schilling
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: