aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Updater.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-08-22 16:56:01 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-08-25 16:13:47 +0200
commita83a8f0dde07bff67e0ceb7008cc26b3fad32516 (patch)
treea1dcc3e67eab7f2ff56a0fc60aa3f19387b943cd /lib/private/Updater.php
parent5aac997d448da55f1c43648b1e5cf1a9c1360d6c (diff)
downloadnextcloud-server-a83a8f0dde07bff67e0ceb7008cc26b3fad32516.tar.gz
nextcloud-server-a83a8f0dde07bff67e0ceb7008cc26b3fad32516.zip
Migrate Migrator::executeSql to OCP\EventDispatcher\Event
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r--lib/private/Updater.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 1b91441d676..e63c158f7a2 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -463,12 +463,14 @@ class Updater extends BasicEmitter {
$log = $this->log;
$dispatcher = \OC::$server->getEventDispatcher();
- $dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($log) {
- if (!$event instanceof GenericEvent) {
- return;
+ /** @var IEventDispatcher $newDispatcher */
+ $newDispatcher = \OC::$server->get(IEventDispatcher::class);
+ $newDispatcher->addListener(
+ MigratorExecuteSqlEvent::class,
+ function (MigratorExecuteSqlEvent $event) use ($log) {
+ $log->info(get_class($event).': ' . $event->getSql() . ' (' . $event->getCurrentStep() . ' of ' . $event->getMaxStep() . ')', ['app' => 'updater']);
}
- $log->info('\OC\DB\Migrator::executeSql: ' . $event->getSubject() . ' (' . $event->getArgument('step') . ' of ' . $event->getArgument('max') . ')', ['app' => 'updater']);
- });
+ );
$repairListener = function ($event) use ($log) {
if (!$event instanceof GenericEvent) {