aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-05 12:05:11 +0200
committerGitHub <noreply@github.com>2023-07-05 12:05:11 +0200
commitc5285d68b19f6e53019c47d2d12b48f7c70e26d3 (patch)
treeb0dcce9541ad09e0860457db608ab5942f100df6 /lib/private
parent74d78fb656d0ad1da9623c3564332f86677461eb (diff)
parenteb090538972533c40c4a2589f44b9f9454edbb1d (diff)
downloadnextcloud-server-c5285d68b19f6e53019c47d2d12b48f7c70e26d3.tar.gz
nextcloud-server-c5285d68b19f6e53019c47d2d12b48f7c70e26d3.zip
Merge pull request #39086 from nextcloud/bugfix/noid/migrate-admin_audit-to-IEventDispatcher
feat(admin_audit): Migrate to non-deprecated IEventDispatcher
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Console/Application.php12
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);
}