diff --git a/PHPCI/Command/UpdateCommand.php b/PHPCI/Command/UpdateCommand.php index f8e66150..492ffeff 100644 --- a/PHPCI/Command/UpdateCommand.php +++ b/PHPCI/Command/UpdateCommand.php @@ -9,7 +9,7 @@ namespace PHPCI\Command; -use b8\Config; +use PHPCI\Config; use Monolog\Logger; use PHPCI\Helper\Lang; use Symfony\Component\Console\Command\Command; @@ -29,11 +29,17 @@ class UpdateCommand extends Command */ protected $logger; - public function __construct(Logger $logger) + /** + * @var Config + */ + protected $config; + + public function __construct(Logger $logger, Config $config) { parent::__construct(); $this->logger = $logger; + $this->config = $config; } protected function configure() @@ -61,8 +67,7 @@ class UpdateCommand extends Command protected function verifyInstalled(OutputInterface $output) { - $config = Config::getInstance(); - $phpciUrl = $config->get('phpci.url'); + $phpciUrl = $this->config->get('phpci.url'); return !empty($phpciUrl); } diff --git a/services.yml b/services.yml index 01ad0eb6..83144b6e 100644 --- a/services.yml +++ b/services.yml @@ -76,6 +76,7 @@ services: class: PHPCI\Command\UpdateCommand arguments: - @console.logger + - @config console.command.daemon: class: PHPCI\Command\DaemonCommand arguments: