diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-04-11 11:53:51 +0300 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-04-11 16:59:27 +0300 |
commit | dda51d49d7e108d149c042964f9c2e3efef14110 (patch) | |
tree | 0ddcd5bfa6d62cea44f4c086db5b4886077c31e9 /lib/public | |
parent | 682468ef5cda2d3aefed9cd5db80021da22bb593 (diff) |
Use Migrators id instead of class names
This will help with UI and means migrators can move in namespaces
without changing export format.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/UserMigration/IImportSource.php | 2 | ||||
-rw-r--r-- | lib/public/UserMigration/IMigrator.php | 2 | ||||
-rw-r--r-- | lib/public/UserMigration/TMigratorBasicVersionHandling.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/UserMigration/IImportSource.php b/lib/public/UserMigration/IImportSource.php index d34f2752549..3816afdd033 100644 --- a/lib/public/UserMigration/IImportSource.php +++ b/lib/public/UserMigration/IImportSource.php @@ -91,7 +91,7 @@ interface IImportSource { /** * @return ?int Version for this migrator from the export archive. Null means migrator missing. * - * @param class-string<IMigrator> $migrator + * @param string $migrator Migrator id (as returned by IMigrator::getId) * * @since 24.0.0 */ diff --git a/lib/public/UserMigration/IMigrator.php b/lib/public/UserMigration/IMigrator.php index 7c89e041f34..d02e5df0683 100644 --- a/lib/public/UserMigration/IMigrator.php +++ b/lib/public/UserMigration/IMigrator.php @@ -89,7 +89,7 @@ interface IMigrator { /** * Checks whether it is able to import a version of the export format for this migrator - * Use $importSource->getMigratorVersion(static::class) to get the version from the archive + * Use $importSource->getMigratorVersion($this->getId()) to get the version from the archive * * @since 24.0.0 */ diff --git a/lib/public/UserMigration/TMigratorBasicVersionHandling.php b/lib/public/UserMigration/TMigratorBasicVersionHandling.php index 20a30a24307..9010d14a173 100644 --- a/lib/public/UserMigration/TMigratorBasicVersionHandling.php +++ b/lib/public/UserMigration/TMigratorBasicVersionHandling.php @@ -50,7 +50,7 @@ trait TMigratorBasicVersionHandling { public function canImport( IImportSource $importSource ): bool { - $version = $importSource->getMigratorVersion(static::class); + $version = $importSource->getMigratorVersion($this->getId()); if ($version === null) { return !$this->mandatory; } |