Permalink
Browse files

Removing service initializer as of zendframework/zendframework#3537

  • Loading branch information...
1 parent 4aae00a commit 053d6f158162b594a7cf1d301cc45cfd8904f563 @Ocramius Ocramius committed Jan 23, 2013
@@ -36,7 +36,6 @@ public function createService(ServiceLocatorInterface $serviceLocator)
if (isset($configuration['di']) && $serviceLocator->has('Di')) {
$plugins->addAbstractFactory($serviceLocator->get('DiAbstractServiceFactory'));
- $plugins->addInitializer($serviceLocator->get('DiServiceInitializer'));
}
return $plugins;
@@ -24,13 +24,6 @@ class DiServiceInitializerFactory implements FactoryInterface
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
- $initializer = new DiServiceInitializer($serviceLocator->get('Di'), $serviceLocator);
-
- if ($serviceLocator instanceof ServiceManager) {
- /* @var $serviceLocator ServiceManager */
- $serviceLocator->addInitializer($initializer);
- }
-
- return $initializer;
+ return new DiServiceInitializer($serviceLocator->get('Di'), $serviceLocator);
}
}
@@ -15,7 +15,7 @@
class DiFactoryTest extends \PHPUnit_Framework_TestCase
{
- public function testWillInitializeDiAndDiAbstractFactoryAndDiInitializer()
+ public function testWillInitializeDiAndDiAbstractFactory()
{
$serviceManager = new ServiceManager();
$serviceManager->setService('Config', array('di' => array('')));

0 comments on commit 053d6f1

Please sign in to comment.