diff --git a/core/lib/Thelia/Core/EventListener/ControllerListener.php b/core/lib/Thelia/Core/EventListener/ControllerListener.php index 6582797fb..193621d27 100644 --- a/core/lib/Thelia/Core/EventListener/ControllerListener.php +++ b/core/lib/Thelia/Core/EventListener/ControllerListener.php @@ -48,7 +48,7 @@ class ControllerListener implements EventSubscriberInterface $request = $event->getRequest(); if (false !== $action = $request->get("action")) { //search corresponding action - $event = new ActionEventFactory($request, $action, $event->getDispatcher(), $event->getKernel()->getContainer()->getParameter("thelia.actionEvent")); + $event = new ActionEventFactory($request, $action, $event->getKernel()->getContainer()->getParameter("thelia.actionEvent")); $dispatcher->dispatch("action.".$action, $event->createActionEvent()); } diff --git a/core/lib/Thelia/Core/Factory/ActionEventFactory.php b/core/lib/Thelia/Core/Factory/ActionEventFactory.php index 0cb26ce4e..10e568a4a 100644 --- a/core/lib/Thelia/Core/Factory/ActionEventFactory.php +++ b/core/lib/Thelia/Core/Factory/ActionEventFactory.php @@ -32,7 +32,6 @@ class ActionEventFactory protected $request; protected $action; - protected $dispatcher; /** * @todo : delegate to config for creating associating value @@ -43,11 +42,10 @@ class ActionEventFactory protected $defaultClassName = "Thelia\Core\Event\DefaultActionEvent"; - public function __construct(Request $request, $action, EventDispatcherInterface $dispatcher, $className) + public function __construct(Request $request, $action, $className) { $this->request = $request; $this->action = $action; - $this->dispatcher = $dispatcher; $this->className = $className; }