Skip to content

Commit

Permalink
fix deprecated ServiceLocatorAwareInterface warning
Browse files Browse the repository at this point in the history
by having the PluginManager factories inject the ServiceLocator themselves
resolves neeckeloo#2
  • Loading branch information
Roel Arents committed May 31, 2016
1 parent d37bcb2 commit 5eeeb44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Factory/FormatterPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public function createService(ServiceLocatorInterface $serviceLocator)
{
$config = $serviceLocator->get('Config');
$configInstance = new Config($config['monolog']['formatter_plugin_manager']);
$formatterPluginManager = new FormatterPluginManager($configInstance);
$formatterPluginManager->setServiceLocator($serviceLocator);

return new FormatterPluginManager($configInstance);
return $formatterPluginManager;
}
}
4 changes: 3 additions & 1 deletion src/Factory/HandlerPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public function createService(ServiceLocatorInterface $serviceLocator)
{
$config = $serviceLocator->get('Config');
$configInstance = new Config($config['monolog']['handler_plugin_manager']);
$handlerPluginManager = new HandlerPluginManager($configInstance);
$handlerPluginManager->setServiceLocator($serviceLocator);

return new HandlerPluginManager($configInstance);
return $handlerPluginManager;
}
}

0 comments on commit 5eeeb44

Please sign in to comment.