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

Commit

Permalink
Merge branch 'hotfix/235' into develop
Browse files Browse the repository at this point in the history
Forward port #235
  • Loading branch information
weierophinney committed Apr 17, 2018
2 parents f32dee8 + c43a518 commit 9628df7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All notable changes to this project will be documented in this file, in reverse

### Changed

- Nothing.
- [#235](https://github.com/zendframework/zend-developer-tools/pull/235) modifies the module bootstrap to defer retrieval of services until they are needed.

### Deprecated

Expand Down
5 changes: 3 additions & 2 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public function onBootstrap(EventInterface $event)
}

$app = $event->getApplication();
$em = $app->getEventManager();
$sem = $em->getSharedManager();
$sm = $app->getServiceManager();

$options = $sm->get('ZendDeveloperTools\Config');
Expand All @@ -88,6 +86,8 @@ public function onBootstrap(EventInterface $event)
return;
}

$em = $app->getEventManager();

$report = $sm->get('ZendDeveloperTools\Report');

if ($options->canFlushEarly()) {
Expand All @@ -100,6 +100,7 @@ public function onBootstrap(EventInterface $event)
}

if ($options->eventCollectionEnabled()) {
$sem = $em->getSharedManager();
$eventLoggingListener = $sm->get('ZendDeveloperTools\EventLoggingListenerAggregate');
$eventLoggingListener->attachShared($sem);
}
Expand Down

0 comments on commit 9628df7

Please sign in to comment.