Skip to content

Commit 3f88e59

Browse files
committed
fixup! feat: Add user_migration:manage command and last export date
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 9d6f486 commit 3f88e59

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/Command/Export.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
178178
if (rename($path, $finalPath) === false) {
179179
throw new \Exception('Failed to rename ' . basename($path) . ' to ' . basename($finalPath));
180180
}
181-
$this->config->setUserValue($user->getUID(), Application::APP_ID, 'lastExport', $this->timeFactory->getTime());
181+
$this->config->setUserValue($user->getUID(), Application::APP_ID, 'lastExport', (string)$this->timeFactory->getTime());
182182
$io->writeln("Export saved in $finalPath");
183183
} catch (\Exception $e) {
184184
if ($io->isDebug()) {

tests/stubs/stub.phpstub

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ namespace OC\Cache {
125125
namespace OC\Core\Command {
126126
use Symfony\Component\Console\Input\InputInterface;
127127
use Symfony\Component\Console\Output\OutputInterface;
128+
use Symfony\Component\Console\Command\Command;
128129

129-
class Base {
130+
class Base extends Command {
130131
public const OUTPUT_FORMAT_PLAIN = 'plain';
131132
public const OUTPUT_FORMAT_JSON = 'json';
132133
public const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
@@ -139,5 +140,6 @@ namespace OC\Core\Command {
139140
public function setName(string $name) {}
140141
public function getHelper(string $name) {}
141142
protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, array $items, string $prefix = ' - ') {}
143+
protected function writeTableInOutputFormat(InputInterface $input, OutputInterface $output, array $items): void {}
142144
}
143145
}

0 commit comments

Comments
 (0)