Import statements and update configuration.

This commit is contained in:
James Cole
2025-05-27 16:57:36 +02:00
parent 7c04c4c2bc
commit c074fec0a7
165 changed files with 530 additions and 335 deletions

View File

@@ -31,6 +31,8 @@ use Illuminate\Console\Command;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use JsonException;
use stdClass;
class RemovesDatabaseDecryption extends Command
{
@@ -105,13 +107,13 @@ class RemovesDatabaseDecryption extends Command
{
$rows = DB::table($table)->get(['id', $field]);
/** @var \stdClass $row */
/** @var stdClass $row */
foreach ($rows as $row) {
$this->decryptRow($table, $field, $row);
}
}
private function decryptRow(string $table, string $field, \stdClass $row): void
private function decryptRow(string $table, string $field, stdClass $row): void
{
$original = $row->{$field};
if (null === $original) {
@@ -168,7 +170,7 @@ class RemovesDatabaseDecryption extends Command
// try to json_decrypt the value.
try {
$newValue = \Safe\json_decode($value, true, 512, JSON_THROW_ON_ERROR) ?? $value;
} catch (\JsonException $e) {
} catch (JsonException $e) {
$message = sprintf('Could not JSON decode preference row #%d: %s. This does not have to be a problem.', $id, $e->getMessage());
$this->friendlyError($message);
app('log')->warning($message);

View File

@@ -36,6 +36,7 @@ use FireflyIII\Services\Internal\Destroy\JournalDestroyService;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Exception;
class UpgradesToGroups extends Command
{
@@ -103,7 +104,7 @@ class UpgradesToGroups extends Command
}
/**
* @throws \Exception
* @throws Exception
*/
private function makeGroupsFromSplitJournals(): void
{
@@ -119,7 +120,7 @@ class UpgradesToGroups extends Command
}
/**
* @throws \Exception
* @throws Exception
*/
private function makeMultiGroup(TransactionJournal $journal): void
{