Skip to content

Commit

Permalink
updated TransformersManagerFactory to inject serviceManager throught …
Browse files Browse the repository at this point in the history
…constructor because initializers are deprecated
  • Loading branch information
svycka committed Apr 7, 2016
1 parent c646aad commit 9597b91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"php": ">=5.5",
"zendframework/zend-mvc": "~2.5",
"zendframework/zend-modulemanager": "~2.5",
"zendframework/zend-servicemanager": "~2.5",
"zendframework/zend-servicemanager": "^2.7.5",
"zendframework/zend-http": "~2.5",
"zendframework/zend-stdlib": "~2.5",
"intervention/image": "~2.3"
Expand Down Expand Up @@ -56,4 +56,4 @@
"dev-master": "1.0-dev"
}
}
}
}
5 changes: 1 addition & 4 deletions src/Transformer/Factory/TransformersManagerFactory.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php
namespace SvImages\Transformer\Factory;

use SvImages\Transformer\FiltersManager;
use SvImages\Transformer\TransformersManager;
use SvImages\Options\ModuleOptions;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

Expand All @@ -18,8 +16,7 @@ public function createService(ServiceLocatorInterface $serviceLocator)
{
/** @var ModuleOptions $options */
$options = $serviceLocator->get(ModuleOptions::class);
$serviceConfig = new Config($options->getTransformers());

return new TransformersManager($serviceConfig);
return new TransformersManager($serviceLocator, $options->getTransformers());
}
}

0 comments on commit 9597b91

Please sign in to comment.