diff options
author | Joas Schilling <coding@schilljs.com> | 2023-06-30 12:50:28 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-04 12:36:30 +0200 |
commit | eb090538972533c40c4a2589f44b9f9454edbb1d (patch) | |
tree | 6bcef8fb2933c18f90adeffec28bef8425256f3a /lib/private/Console | |
parent | 2c71a77f4bd35bf68674be8b0fcff6f9f3c42200 (diff) | |
download | nextcloud-server-eb090538972533c40c4a2589f44b9f9454edbb1d.tar.gz nextcloud-server-eb090538972533c40c4a2589f44b9f9454edbb1d.zip |
feat(admin_audit): Migrate to non-deprecated IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Console')
-rw-r--r-- | lib/private/Console/Application.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 94956364390..11515f26866 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -36,6 +36,7 @@ use OC_App; use OCP\AppFramework\QueryException; use OCP\App\IAppManager; use OCP\Console\ConsoleEvent; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IRequest; use Psr\Log\LoggerInterface; @@ -44,13 +45,12 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; class Application { /** @var IConfig */ private $config; private SymfonyApplication $application; - /** @var EventDispatcherInterface */ + /** @var IEventDispatcher */ private $dispatcher; /** @var IRequest */ private $request; @@ -60,7 +60,7 @@ class Application { private $memoryInfo; public function __construct(IConfig $config, - EventDispatcherInterface $dispatcher, + IEventDispatcher $dispatcher, IRequest $request, LoggerInterface $logger, MemoryInfo $memoryInfo) { @@ -204,10 +204,12 @@ class Application { * @throws \Exception */ public function run(InputInterface $input = null, OutputInterface $output = null) { - $this->dispatcher->dispatch(ConsoleEvent::EVENT_RUN, new ConsoleEvent( + $event = new ConsoleEvent( ConsoleEvent::EVENT_RUN, $this->request->server['argv'] - )); + ); + $this->dispatcher->dispatchTyped($event); + $this->dispatcher->dispatch(ConsoleEvent::EVENT_RUN, $event); return $this->application->run($input, $output); } |