summaryrefslogtreecommitdiffstats
path: root/lib/private/Console/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Console/Application.php')
-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);
}