[ticket/13740] Remove service container from modules

PHPBB3-13740
This commit is contained in:
Mate Bartus 2015-07-09 23:23:40 +02:00
parent 4d2212a3c2
commit e46689a0cd
3 changed files with 5 additions and 11 deletions

View file

@ -60,14 +60,13 @@ services:
installer.module_base: installer.module_base:
abstract: true abstract: true
calls: calls:
- [setup, [@service_container, @installer.helper.config, @installer.helper.iohandler]] - [setup, [@installer.helper.config, @installer.helper.iohandler]]
installer.installer.abstract: installer.installer.abstract:
class: phpbb\install\installer class: phpbb\install\installer
abstract: true abstract: true
arguments: arguments:
- @installer.helper.config - @installer.helper.config
- @service_container
installer.install.module_collection: installer.install.module_collection:
class: phpbb\di\ordered_service_collection class: phpbb\di\ordered_service_collection

View file

@ -55,12 +55,10 @@ class installer
* Constructor * Constructor
* *
* @param config $config Installer config handler * @param config $config Installer config handler
* @param ContainerInterface $container Dependency injection container
*/ */
public function __construct(config $config, ContainerInterface $container) public function __construct(config $config)
{ {
$this->install_config = $config; $this->install_config = $config;
$this->container = $container;
$this->installer_modules = null; $this->installer_modules = null;
} }

View file

@ -17,7 +17,6 @@ use phpbb\di\ordered_service_collection;
use phpbb\install\exception\resource_limit_reached_exception; use phpbb\install\exception\resource_limit_reached_exception;
use phpbb\install\helper\config; use phpbb\install\helper\config;
use phpbb\install\helper\iohandler\iohandler_interface; use phpbb\install\helper\iohandler\iohandler_interface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Base class for installer module * Base class for installer module
@ -78,13 +77,11 @@ abstract class module_base implements module_interface
/** /**
* Dependency getter * Dependency getter
* *
* @param ContainerInterface $container
* @param config $config * @param config $config
* @param iohandler_interface $iohandler * @param iohandler_interface $iohandler
*/ */
public function setup(ContainerInterface $container, config $config, iohandler_interface $iohandler) public function setup(config $config, iohandler_interface $iohandler)
{ {
$this->container = $container;
$this->install_config = $config; $this->install_config = $config;
$this->iohandler = $iohandler; $this->iohandler = $iohandler;
} }
@ -196,9 +193,9 @@ abstract class module_base implements module_interface
} }
/** /**
* Returns the next task's index * Returns the next task's name
* *
* @return string index of the array element of the next task * @return string Index of the array element of the next task
*/ */
protected function recover_progress() protected function recover_progress()
{ {