diff --git a/phpBB/config/default/container/services_storage.yml b/phpBB/config/default/container/services_storage.yml index b3b118f6e2..25b6e8c282 100644 --- a/phpBB/config/default/container/services_storage.yml +++ b/phpBB/config/default/container/services_storage.yml @@ -87,7 +87,9 @@ services: storage.controller.avatar: class: phpbb\storage\controller\avatar arguments: + - '@cache' - '@config' + - '@dbal.conn' - '@storage.avatar' storage.controller.attachment: diff --git a/phpBB/phpbb/storage/controller/attachment.php b/phpBB/phpbb/storage/controller/attachment.php index 2535bcf4f6..45a4cc01c6 100644 --- a/phpBB/phpbb/storage/controller/attachment.php +++ b/phpBB/phpbb/storage/controller/attachment.php @@ -34,9 +34,6 @@ class attachment extends controller /** @var content_visibility */ protected $content_visibility; - /** @var driver_interface */ - protected $db; - /** @var dispatcher */ protected $dispatcher; diff --git a/phpBB/phpbb/storage/controller/avatar.php b/phpBB/phpbb/storage/controller/avatar.php index 6dc177cf06..add1047a58 100644 --- a/phpBB/phpbb/storage/controller/avatar.php +++ b/phpBB/phpbb/storage/controller/avatar.php @@ -15,6 +15,7 @@ namespace phpbb\storage\controller; use phpbb\cache\service; use phpbb\config\config; +use phpbb\db\driver\driver_interface; use phpbb\storage\storage; class avatar extends controller @@ -24,10 +25,11 @@ class avatar extends controller protected $allowed_extensions = ['png', 'gif', 'jpg', 'jpeg']; - public function __construct(service $cache, config $config, storage $storage) + public function __construct(service $cache, config $config, driver_interface $db, storage $storage) { $this->cache = $cache; $this->config = $config; + $this->db = $db; $this->storage = $storage; } diff --git a/phpBB/phpbb/storage/controller/controller.php b/phpBB/phpbb/storage/controller/controller.php index 858173c069..0ca9db91c9 100644 --- a/phpBB/phpbb/storage/controller/controller.php +++ b/phpBB/phpbb/storage/controller/controller.php @@ -13,8 +13,8 @@ namespace phpbb\storage\controller; - use phpbb\cache\service; +use phpbb\db\driver\driver_interface; use phpbb\storage\storage; class controller @@ -23,12 +23,16 @@ class controller /** @var service */ protected $cache; + /** @var driver_interface */ + protected $db; + /** @var storage */ protected $storage; - public function __construct(service $cache, storage $storage) + public function __construct(service $cache, driver_interface $db, storage $storage) { $this->cache = $cache; + $this->db = $db; $this->storage = $storage; }