Skip to content

Commit

Permalink
Merge pull request #519 from nextcloud/fix/fix-deprecated-var-syntax
Browse files Browse the repository at this point in the history
Remove deprecated ${var} syntax
  • Loading branch information
Pytal authored Oct 16, 2023
2 parents fe20b5b + ae6517f commit 1858860
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 1858860

Please sign in to comment.