Skip to content

Commit

Permalink
Remove deprecated ${var} syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Oct 16, 2023
1 parent c6f2b3c commit ae6517f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Command/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$user = null;
}
$path = $input->getArgument('archive');
$io->writeln("Importing from ${path}");
$io->writeln("Importing from {$path}");
$importSource = new ImportSource($path);
$this->migrationService->import($importSource, $user, $io);
$io->writeln("Successfully imported from ${path}");
$io->writeln("Successfully imported from {$path}");
} catch (\Exception $e) {
if ($io->isDebug()) {
$io->error("$e");
Expand Down
4 changes: 1 addition & 3 deletions lib/Service/UserMigrationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,8 @@ public function import(IImportSource $importSource, ?IUser $user = null, ?Output
$output = $output ?? new NullOutput();

try {
$migratorVersions = $importSource->getMigratorVersions();

if (!$this->canImport($importSource)) {
throw new UserMigrationException("Version ${$migratorVersions[$this->getId()]} for main class ".static::class." is not compatible");
throw new UserMigrationException("Version ".($importSource->getMigratorVersion($this->getId()) ?? 'null')." for main class ".static::class." is not compatible");
}

// Check versions
Expand Down

0 comments on commit ae6517f

Please sign in to comment.