diff options
author | sualko <klaus@jsxc.org> | 2021-05-28 19:35:54 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2021-05-28 19:35:54 +0300 |
commit | 0b54f36f5c24d36b8e37495fe0a69cd1a70c3620 (patch) | |
tree | dd108c9962e0c229c7d6aa5af04d70f4bb45468f | |
parent | d5f5ec7187a5ba47511421e13fe0ab54f712b5d6 (diff) |
fix: command DI
-rw-r--r-- | appinfo/register_command.php | 6 | ||||
-rw-r--r-- | lib/AppInfo/Application.php | 18 |
2 files changed, 4 insertions, 20 deletions
diff --git a/appinfo/register_command.php b/appinfo/register_command.php index cf616ac..b376f7d 100644 --- a/appinfo/register_command.php +++ b/appinfo/register_command.php @@ -1,9 +1,11 @@ <?php use OCA\OJSXC\AppInfo\Application; +use OCA\OJSXC\Command\RefreshRoster; +use OCA\OJSXC\Command\ServerSharing; $app = new Application(); /** @var Symfony\Component\Console\Application $application */ -$application->add($app->getContainer()->query('RefreshRosterCommand')); -$application->add($app->getContainer()->query('ServerSharingCommand')); +$application->add($app->getContainer()->query(RefreshRoster::class)); +$application->add($app->getContainer()->query(ServerSharing::class)); diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 10358b1..40e6e12 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -197,24 +197,6 @@ class Application extends App ); } }); - - - /** - * Commands - */ - $container->registerService('RefreshRosterCommand', function ($c) { - return new RefreshRoster( - $c->query('ServerContainer')->getUserManager(), - $c->query(RosterPush::class), - $c->query(PresenceMapper::class) - ); - }); - - $container->registerService('ServerSharingCommand', function ($c) { - return new ServerSharing( - $c->query(\OCP\IConfig::class) - ); - }); } /** |