Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#2241 from weierophinne…
Browse files Browse the repository at this point in the history
…y/hotfix/2235

Remove usage of "application" EM context
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Listener/LocatorRegistrationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function onLoadModulesPost(Event $e)
$events = $moduleManager->getEventManager()->getSharedManager();

// Shared instance for module manager
$events->attach('application', 'bootstrap', function ($e) use ($moduleManager) {
$events->attach('Zend\Mvc\Application', 'bootstrap', function ($e) use ($moduleManager) {
$moduleClassName = get_class($moduleManager);
$application = $e->getApplication();
$services = $application->getServiceManager();
Expand All @@ -81,7 +81,7 @@ public function onLoadModulesPost(Event $e)
}

// Attach to the bootstrap event if there are modules we need to process
$events->attach('application', 'bootstrap', array($this, 'onBootstrap'), 1000);
$events->attach('Zend\Mvc\Application', 'bootstrap', array($this, 'onBootstrap'), 1000);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Listener/OnBootstrapListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function __invoke(ModuleEvent $e)
$moduleManager = $e->getTarget();
$events = $moduleManager->getEventManager();
$sharedEvents = $events->getSharedManager();
$sharedEvents->attach('application', 'bootstrap', array($module, 'onBootstrap'));
$sharedEvents->attach('Zend\Mvc\Application', 'bootstrap', array($module, 'onBootstrap'));
}
}

0 comments on commit fd694bc

Please sign in to comment.