summaryrefslogtreecommitdiffstats
path: root/lib/public/UserMigration/IMigrator.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-02-15 09:56:45 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-02-17 11:31:03 +0100
commit67fb1b92d6ad278377931e62f5f4af809b8cbe28 (patch)
treed58473e21c5d8bcf0ea8f551776fd87cbd15f5ba /lib/public/UserMigration/IMigrator.php
parentb06a622a609ed9c980a14d16d8dd67c95df1a79e (diff)
downloadnextcloud-server-67fb1b92d6ad278377931e62f5f4af809b8cbe28.tar.gz
nextcloud-server-67fb1b92d6ad278377931e62f5f4af809b8cbe28.zip
Improve version handling for user_migration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public/UserMigration/IMigrator.php')
-rw-r--r--lib/public/UserMigration/IMigrator.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/public/UserMigration/IMigrator.php b/lib/public/UserMigration/IMigrator.php
index ab18d41a94f..5a09bf4246b 100644
--- a/lib/public/UserMigration/IMigrator.php
+++ b/lib/public/UserMigration/IMigrator.php
@@ -54,7 +54,8 @@ interface IMigrator {
public function import(
IUser $user,
IImportSource $importSource,
- OutputInterface $output
+ OutputInterface $output,
+ ?int $version
): void;
/**
@@ -67,7 +68,12 @@ interface IMigrator {
/**
* Checks whether it is able to import a version of the export format for this migrator
*
+ * @param ?int $version Version stored in the import source for this migrator. Null means this migrator was not listed.
+ *
* @since 24.0.0
*/
- public function canImport(int $version): bool;
+ public function canImport(
+ IImportSource $importSource,
+ ?int $version
+ ): bool;
}