Skip to content

Commit

Permalink
Fix: Update ConvertType.php to read correct DB params, might fix #45257
Browse files Browse the repository at this point in the history
Signed-off-by: lwenderoth <l.wenderoth@gmx.de>
  • Loading branch information
lwenderoth authored Jul 31, 2024
1 parent 2d299d9 commit 443cd29
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core/Command/Db/ConvertType.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ protected function readPassword(InputInterface $input, OutputInterface $output)
}

protected function execute(InputInterface $input, OutputInterface $output): int {
// WARNING:
// Leave in place until #45257 is addressed to prevent data loss (hopefully in time for the next maintenance release)
//
throw new \InvalidArgumentException(
'This command is temporarily disabled (until the next maintenance release).'
);

$this->validateInput($input, $output);
$this->readPassword($input, $output);

Expand Down Expand Up @@ -226,7 +219,7 @@ protected function createSchema(Connection $fromDB, Connection $toDB, InputInter

protected function getToDBConnection(InputInterface $input, OutputInterface $output) {
$type = $input->getArgument('type');
$connectionParams = $this->connectionFactory->createConnectionParams();
$connectionParams = $this->connectionFactory->createDefaultConnectionParams($type);

Check failure on line 222 in core/Command/Db/ConvertType.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedMethod

core/Command/Db/ConvertType.php:222:49: UndefinedMethod: Method OC\DB\ConnectionFactory::createDefaultConnectionParams does not exist (see https://psalm.dev/022)

Check failure

Code scanning / Psalm

UndefinedMethod Error

Method OC\DB\ConnectionFactory::createDefaultConnectionParams does not exist
$connectionParams = array_merge($connectionParams, [
'host' => $input->getArgument('hostname'),
'user' => $input->getArgument('username'),
Expand Down

0 comments on commit 443cd29

Please sign in to comment.