Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2025-12-20

JC53b8caba37c63
diff --git a/app/Api/V1/Controllers/System/CronController.php b/app/Api/V1/Controllers/System/CronController.php
index 7fa41e4c7a..5f520fad85 100644
--- a/app/Api/V1/Controllers/System/CronController.php
+++ b/app/Api/V1/Controllers/System/CronController.php
@@ -29,6 +29,7 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
use FireflyIII\Support\Http\Controllers\CronRunner;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class CronController
@@ -50,7 +51,7 @@ class CronController extends Controller
$return = [];
$return['recurring_transactions'] = $this->runRecurring($config['force'], $config['date']);
$return['auto_budgets'] = $this->runAutoBudget($config['force'], $config['date']);
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data) {
+ if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data) {
$return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']);
}
$return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']);
diff --git a/app/Api/V1/Controllers/Webhook/AttemptController.php b/app/Api/V1/Controllers/Webhook/AttemptController.php
index 123f570a98..5f0c376d2b 100644
--- a/app/Api/V1/Controllers/Webhook/AttemptController.php
+++ b/app/Api/V1/Controllers/Webhook/AttemptController.php
@@ -38,6 +38,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class AttemptController
@@ -71,7 +72,7 @@ class AttemptController extends Controller
if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match');
}
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User lists webhook attempts of webhook #%d and message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -115,7 +116,7 @@ class AttemptController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match');
}
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User views single webhook attempt #%d of webhook #%d and message #%d, but webhooks are DISABLED', $attempt->id, $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/DestroyController.php b/app/Api/V1/Controllers/Webhook/DestroyController.php
index 1154ae2caa..002458fa86 100644
--- a/app/Api/V1/Controllers/Webhook/DestroyController.php
+++ b/app/Api/V1/Controllers/Webhook/DestroyController.php
@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Preferences;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class DestroyController
@@ -63,7 +64,7 @@ class DestroyController extends Controller
*/
public function destroy(Webhook $webhook): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d. but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -93,7 +94,7 @@ class DestroyController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match');
}
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, attempt #%d, but webhooks are DISABLED.', $webhook->id, $message->id, $attempt->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -121,7 +122,7 @@ class DestroyController extends Controller
throw new FireflyException('200040: Webhook and webhook message are no match');
}
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/MessageController.php b/app/Api/V1/Controllers/Webhook/MessageController.php
index c9c404be5f..48c1dd155e 100644
--- a/app/Api/V1/Controllers/Webhook/MessageController.php
+++ b/app/Api/V1/Controllers/Webhook/MessageController.php
@@ -37,6 +37,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class MessageController
@@ -65,7 +66,7 @@ class MessageController extends Controller
*/
public function index(Webhook $webhook): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view messages of webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -105,7 +106,7 @@ class MessageController extends Controller
if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match');
}
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view message #%d of webhook #%d, but webhooks are DISABLED.', $message->id, $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/ShowController.php b/app/Api/V1/Controllers/Webhook/ShowController.php
index d33bbdbd84..260d26e413 100644
--- a/app/Api/V1/Controllers/Webhook/ShowController.php
+++ b/app/Api/V1/Controllers/Webhook/ShowController.php
@@ -42,6 +42,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class ShowController
@@ -72,7 +73,7 @@ class ShowController extends Controller
*/
public function index(): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to view all webhooks, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -114,7 +115,7 @@ class ShowController extends Controller
*/
public function show(Webhook $webhook): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to view webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -146,7 +147,7 @@ class ShowController extends Controller
*/
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to trigger webhook #%d on transaction group #%d, but webhooks are DISABLED.', $webhook->id, $group->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/StoreController.php b/app/Api/V1/Controllers/Webhook/StoreController.php
index 25692f748c..4f46d23ebc 100644
--- a/app/Api/V1/Controllers/Webhook/StoreController.php
+++ b/app/Api/V1/Controllers/Webhook/StoreController.php
@@ -34,6 +34,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class StoreController
@@ -63,7 +64,7 @@ class StoreController extends Controller
public function store(CreateRequest $request): JsonResponse
{
$data = $request->getData();
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data);
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/SubmitController.php b/app/Api/V1/Controllers/Webhook/SubmitController.php
index 51cdb6c70e..472af55dca 100644
--- a/app/Api/V1/Controllers/Webhook/SubmitController.php
+++ b/app/Api/V1/Controllers/Webhook/SubmitController.php
@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class SubmitController
@@ -58,7 +59,7 @@ class SubmitController extends Controller
*/
public function submit(Webhook $webhook): JsonResponse
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to submit webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Controllers/Webhook/UpdateController.php b/app/Api/V1/Controllers/Webhook/UpdateController.php
index 5b6c7067b7..15e39c02f0 100644
--- a/app/Api/V1/Controllers/Webhook/UpdateController.php
+++ b/app/Api/V1/Controllers/Webhook/UpdateController.php
@@ -35,6 +35,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class UpdateController
@@ -63,7 +64,7 @@ class UpdateController extends Controller
public function update(Webhook $webhook, UpdateRequest $request): JsonResponse
{
$data = $request->getData();
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data);
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
index 223e8ab7bb..cf341ed7ac 100644
--- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
+++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
@@ -40,6 +40,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class StoreRequest
@@ -176,7 +177,7 @@ class StoreRequest extends FormRequest
public function rules(): array
{
Log::debug('Collect rules of TransactionStoreRequest');
- $validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
+ $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
$locationRules = Location::requestRules([]);
return [
diff --git a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php
index 1f674da33f..7ea7b26988 100644
--- a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php
@@ -38,6 +38,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class UpdateRequest
@@ -248,7 +249,7 @@ class UpdateRequest extends FormRequest
public function rules(): array
{
Log::debug(sprintf('Now in %s', __METHOD__));
- $validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
+ $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [
// basic fields for group:
diff --git a/app/Api/V1/Requests/Models/Webhook/CreateRequest.php b/app/Api/V1/Requests/Models/Webhook/CreateRequest.php
index 5b059648c5..586de7e348 100644
--- a/app/Api/V1/Requests/Models/Webhook/CreateRequest.php
+++ b/app/Api/V1/Requests/Models/Webhook/CreateRequest.php
@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class CreateRequest
@@ -73,7 +74,7 @@ class CreateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries()));
- $validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
+ $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [
'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title',
diff --git a/app/Api/V1/Requests/Models/Webhook/UpdateRequest.php b/app/Api/V1/Requests/Models/Webhook/UpdateRequest.php
index e7b5a3d661..f5e6d21666 100644
--- a/app/Api/V1/Requests/Models/Webhook/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/Webhook/UpdateRequest.php
@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class UpdateRequest
@@ -73,7 +74,7 @@ class UpdateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries()));
- $validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
+ $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
/** @var Webhook $webhook */
$webhook = $this->route()->parameter('webhook');
diff --git a/app/Console/Commands/Correction/CorrectsPrimaryCurrencyAmounts.php b/app/Console/Commands/Correction/CorrectsPrimaryCurrencyAmounts.php
index f9150c55bc..ab19957bd2 100644
--- a/app/Console/Commands/Correction/CorrectsPrimaryCurrencyAmounts.php
+++ b/app/Console/Commands/Correction/CorrectsPrimaryCurrencyAmounts.php
@@ -48,6 +48,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as DatabaseBuilder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class CorrectsPrimaryCurrencyAmounts extends Command
{
@@ -62,7 +63,7 @@ class CorrectsPrimaryCurrencyAmounts extends Command
*/
public function handle(): int
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
+ if (false === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
$this->friendlyInfo('This command will not run because currency exchange rates are disabled.');
return 0;
diff --git a/app/Console/Commands/Correction/CorrectsUnevenAmount.php b/app/Console/Commands/Correction/CorrectsUnevenAmount.php
index d5fef32fe2..1bc8505f6b 100644
--- a/app/Console/Commands/Correction/CorrectsUnevenAmount.php
+++ b/app/Console/Commands/Correction/CorrectsUnevenAmount.php
@@ -61,7 +61,7 @@ class CorrectsUnevenAmount extends Command
$this->fixUnevenAmounts();
$this->matchCurrencies();
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
+ if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.');
AccountBalanceCalculator::recalculateAll(false);
$this->friendlyInfo('Done recalculating transaction running balance columns.');
diff --git a/app/Console/Commands/System/RecalculatesRunningBalance.php b/app/Console/Commands/System/RecalculatesRunningBalance.php
index 4453e1e50d..2f60436f0d 100644
--- a/app/Console/Commands/System/RecalculatesRunningBalance.php
+++ b/app/Console/Commands/System/RecalculatesRunningBalance.php
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\System;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class RecalculatesRunningBalance extends Command
{
@@ -52,7 +53,7 @@ class RecalculatesRunningBalance extends Command
*/
public function handle(): int
{
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
+ if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->correctBalanceAmounts($this->option('force'));
$this->friendlyInfo('Done recalculating account balances.');
diff --git a/app/Console/Commands/System/VerifySecurityAlerts.php b/app/Console/Commands/System/VerifySecurityAlerts.php
index 53c09d7da0..b7de7849c0 100644
--- a/app/Console/Commands/System/VerifySecurityAlerts.php
+++ b/app/Console/Commands/System/VerifySecurityAlerts.php
@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use League\Flysystem\FilesystemException;
use Safe\Exceptions\JsonException;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode;
@@ -107,8 +108,8 @@ class VerifySecurityAlerts extends Command
private function removeOldAdvisory(): void
{
try {
- \FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_message');
- \FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_level');
+ FireflyConfig::delete('upgrade_security_message');
+ FireflyConfig::delete('upgrade_security_level');
} catch (QueryException $e) {
Log::debug(sprintf('Could not delete old security advisory, but thats OK: %s', $e->getMessage()));
}
@@ -117,8 +118,8 @@ class VerifySecurityAlerts extends Command
private function saveSecurityAdvisory(array $array): void
{
try {
- \FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_message', $array['message']);
- \FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_level', $array['level']);
+ FireflyConfig::set('upgrade_security_message', $array['message']);
+ FireflyConfig::set('upgrade_security_level', $array['level']);
} catch (QueryException $e) {
Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage()));
}
diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php
index 9348ac95b5..f889e00e88 100644
--- a/app/Console/Commands/Tools/Cron.php
+++ b/app/Console/Commands/Tools/Cron.php
@@ -36,6 +36,7 @@ use FireflyIII\Support\Cronjobs\WebhookCronjob;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use InvalidArgumentException;
+use FireflyIII\Support\Facades\FireflyConfig;
class Cron extends Command
{
@@ -72,7 +73,7 @@ class Cron extends Command
$force = (bool) $this->option('force'); // @phpstan-ignore-line
// Fire exchange rates cron job.
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data && ($doAll || $this->option('download-cer'))) {
+ if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data && ($doAll || $this->option('download-cer'))) {
try {
$this->exchangeRatesCronJob($force, $date);
} catch (FireflyException $e) {
diff --git a/app/Console/Commands/Upgrade/AddsTransactionIdentifiers.php b/app/Console/Commands/Upgrade/AddsTransactionIdentifiers.php
index c07952b28b..bb48c3d529 100644
--- a/app/Console/Commands/Upgrade/AddsTransactionIdentifiers.php
+++ b/app/Console/Commands/Upgrade/AddsTransactionIdentifiers.php
@@ -32,6 +32,7 @@ use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;
+use FireflyIII\Support\Facades\FireflyConfig;
class AddsTransactionIdentifiers extends Command
{
@@ -97,7 +98,7 @@ class AddsTransactionIdentifiers extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -157,6 +158,6 @@ class AddsTransactionIdentifiers extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/RemovesDatabaseDecryption.php b/app/Console/Commands/Upgrade/RemovesDatabaseDecryption.php
index ff051b324e..477ae31893 100644
--- a/app/Console/Commands/Upgrade/RemovesDatabaseDecryption.php
+++ b/app/Console/Commands/Upgrade/RemovesDatabaseDecryption.php
@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use JsonException;
use stdClass;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode;
@@ -86,7 +87,7 @@ class RemovesDatabaseDecryption extends Command
$this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table));
// mark as decrypted:
$configName = sprintf('is_decrypted_%s', $table);
- \FireflyIII\Support\Facades\FireflyConfig::set($configName, true);
+ FireflyConfig::set($configName, true);
}
private function isDecrypted(string $table): bool
@@ -95,7 +96,7 @@ class RemovesDatabaseDecryption extends Command
$configVar = null;
try {
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get($configName, false);
+ $configVar = FireflyConfig::get($configName, false);
} catch (FireflyException $e) {
Log::error($e->getMessage());
}
diff --git a/app/Console/Commands/Upgrade/RepairsAccountBalances.php b/app/Console/Commands/Upgrade/RepairsAccountBalances.php
index 28a0354559..89a3e57951 100644
--- a/app/Console/Commands/Upgrade/RepairsAccountBalances.php
+++ b/app/Console/Commands/Upgrade/RepairsAccountBalances.php
@@ -27,6 +27,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class RepairsAccountBalances extends Command
{
@@ -43,7 +44,7 @@ class RepairsAccountBalances extends Command
return 0;
}
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
+ if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->markAsExecuted();
$this->correctBalanceAmounts();
@@ -58,14 +59,14 @@ class RepairsAccountBalances extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data;
}
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
private function correctBalanceAmounts(): void
diff --git a/app/Console/Commands/Upgrade/UpgradesAccountCurrencies.php b/app/Console/Commands/Upgrade/UpgradesAccountCurrencies.php
index 7ab7392f4d..833f87ab4a 100644
--- a/app/Console/Commands/Upgrade/UpgradesAccountCurrencies.php
+++ b/app/Console/Commands/Upgrade/UpgradesAccountCurrencies.php
@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountCurrencies extends Command
{
@@ -85,7 +86,7 @@ class UpgradesAccountCurrencies extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data;
}
@@ -155,6 +156,6 @@ class UpgradesAccountCurrencies extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesAccountMetaData.php b/app/Console/Commands/Upgrade/UpgradesAccountMetaData.php
index d62504694d..0317392225 100644
--- a/app/Console/Commands/Upgrade/UpgradesAccountMetaData.php
+++ b/app/Console/Commands/Upgrade/UpgradesAccountMetaData.php
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\AccountMeta;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountMetaData extends Command
{
@@ -82,7 +83,7 @@ class UpgradesAccountMetaData extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -90,6 +91,6 @@ class UpgradesAccountMetaData extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesAttachments.php b/app/Console/Commands/Upgrade/UpgradesAttachments.php
index 13856443e0..4a8b19eb04 100644
--- a/app/Console/Commands/Upgrade/UpgradesAttachments.php
+++ b/app/Console/Commands/Upgrade/UpgradesAttachments.php
@@ -30,6 +30,7 @@ use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAttachments extends Command
{
@@ -92,7 +93,7 @@ class UpgradesAttachments extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -100,6 +101,6 @@ class UpgradesAttachments extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesBillsToRules.php b/app/Console/Commands/Upgrade/UpgradesBillsToRules.php
index b73b56f221..eba532e037 100644
--- a/app/Console/Commands/Upgrade/UpgradesBillsToRules.php
+++ b/app/Console/Commands/Upgrade/UpgradesBillsToRules.php
@@ -36,6 +36,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\User;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBillsToRules extends Command
{
@@ -99,7 +100,7 @@ class UpgradesBillsToRules extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -206,6 +207,6 @@ class UpgradesBillsToRules extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/UpgradesBudgetLimitPeriods.php
index 2578ab0b25..982ad58f46 100644
--- a/app/Console/Commands/Upgrade/UpgradesBudgetLimitPeriods.php
+++ b/app/Console/Commands/Upgrade/UpgradesBudgetLimitPeriods.php
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimitPeriods extends Command
{
@@ -58,7 +59,7 @@ class UpgradesBudgetLimitPeriods extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data;
}
@@ -152,6 +153,6 @@ class UpgradesBudgetLimitPeriods extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesBudgetLimits.php b/app/Console/Commands/Upgrade/UpgradesBudgetLimits.php
index c9756098c7..1f0d670b42 100644
--- a/app/Console/Commands/Upgrade/UpgradesBudgetLimits.php
+++ b/app/Console/Commands/Upgrade/UpgradesBudgetLimits.php
@@ -30,6 +30,7 @@ use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\User;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimits extends Command
{
@@ -84,7 +85,7 @@ class UpgradesBudgetLimits extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -92,6 +93,6 @@ class UpgradesBudgetLimits extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesCreditCardLiabilities.php b/app/Console/Commands/Upgrade/UpgradesCreditCardLiabilities.php
index 9b60caf1bd..c7cf0a89e4 100644
--- a/app/Console/Commands/Upgrade/UpgradesCreditCardLiabilities.php
+++ b/app/Console/Commands/Upgrade/UpgradesCreditCardLiabilities.php
@@ -31,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCreditCardLiabilities extends Command
{
@@ -80,13 +81,13 @@ class UpgradesCreditCardLiabilities extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data;
}
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesCurrencyPreferences.php b/app/Console/Commands/Upgrade/UpgradesCurrencyPreferences.php
index f6fc42a7d1..465a18e7c7 100644
--- a/app/Console/Commands/Upgrade/UpgradesCurrencyPreferences.php
+++ b/app/Console/Commands/Upgrade/UpgradesCurrencyPreferences.php
@@ -33,6 +33,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\User;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCurrencyPreferences extends Command
{
@@ -65,7 +66,7 @@ class UpgradesCurrencyPreferences extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -144,6 +145,6 @@ class UpgradesCurrencyPreferences extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesJournalMetaData.php b/app/Console/Commands/Upgrade/UpgradesJournalMetaData.php
index 8c02368773..4ee5d9f50b 100644
--- a/app/Console/Commands/Upgrade/UpgradesJournalMetaData.php
+++ b/app/Console/Commands/Upgrade/UpgradesJournalMetaData.php
@@ -32,6 +32,7 @@ use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalMetaData extends Command
{
@@ -69,14 +70,14 @@ class UpgradesJournalMetaData extends Command
private function isMigrated(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(UpgradesToGroups::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(UpgradesToGroups::CONFIG_NAME, false);
return (bool) $configVar->data;
}
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data;
}
@@ -218,6 +219,6 @@ class UpgradesJournalMetaData extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesJournalNotes.php b/app/Console/Commands/Upgrade/UpgradesJournalNotes.php
index 6cd7dfcbea..8302818752 100644
--- a/app/Console/Commands/Upgrade/UpgradesJournalNotes.php
+++ b/app/Console/Commands/Upgrade/UpgradesJournalNotes.php
@@ -29,6 +29,7 @@ use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalNotes extends Command
{
@@ -86,7 +87,7 @@ class UpgradesJournalNotes extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -94,6 +95,6 @@ class UpgradesJournalNotes extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesLiabilities.php b/app/Console/Commands/Upgrade/UpgradesLiabilities.php
index 89a10e9359..c5e811ea82 100644
--- a/app/Console/Commands/Upgrade/UpgradesLiabilities.php
+++ b/app/Console/Commands/Upgrade/UpgradesLiabilities.php
@@ -33,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilities extends Command
{
@@ -61,7 +62,7 @@ class UpgradesLiabilities extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -148,6 +149,6 @@ class UpgradesLiabilities extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php b/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
index 3a24482b7b..65dc51b655 100644
--- a/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
+++ b/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
@@ -36,6 +36,7 @@ use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilitiesEight extends Command
{
@@ -63,7 +64,7 @@ class UpgradesLiabilitiesEight extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -207,6 +208,6 @@ class UpgradesLiabilitiesEight extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesMultiPiggyBanks.php b/app/Console/Commands/Upgrade/UpgradesMultiPiggyBanks.php
index 26a1fa929f..1207bc9c76 100644
--- a/app/Console/Commands/Upgrade/UpgradesMultiPiggyBanks.php
+++ b/app/Console/Commands/Upgrade/UpgradesMultiPiggyBanks.php
@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesMultiPiggyBanks extends Command
{
@@ -64,7 +65,7 @@ class UpgradesMultiPiggyBanks extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -112,6 +113,6 @@ class UpgradesMultiPiggyBanks extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesPrimaryCurrencyAmounts.php b/app/Console/Commands/Upgrade/UpgradesPrimaryCurrencyAmounts.php
index 55647c6b99..6243e5f499 100644
--- a/app/Console/Commands/Upgrade/UpgradesPrimaryCurrencyAmounts.php
+++ b/app/Console/Commands/Upgrade/UpgradesPrimaryCurrencyAmounts.php
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesPrimaryCurrencyAmounts extends Command
{
@@ -60,7 +61,7 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -68,6 +69,6 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesRecurrenceMetaData.php b/app/Console/Commands/Upgrade/UpgradesRecurrenceMetaData.php
index c3f6419f63..b063fd4ded 100644
--- a/app/Console/Commands/Upgrade/UpgradesRecurrenceMetaData.php
+++ b/app/Console/Commands/Upgrade/UpgradesRecurrenceMetaData.php
@@ -29,6 +29,7 @@ use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceMeta;
use FireflyIII\Models\RecurrenceTransactionMeta;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_encode;
@@ -65,7 +66,7 @@ class UpgradesRecurrenceMetaData extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -117,6 +118,6 @@ class UpgradesRecurrenceMetaData extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesRuleActions.php b/app/Console/Commands/Upgrade/UpgradesRuleActions.php
index 70e1b7c52f..54d6135a08 100644
--- a/app/Console/Commands/Upgrade/UpgradesRuleActions.php
+++ b/app/Console/Commands/Upgrade/UpgradesRuleActions.php
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\RuleAction;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesRuleActions extends Command
{
@@ -63,7 +64,7 @@ class UpgradesRuleActions extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -183,6 +184,6 @@ class UpgradesRuleActions extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesTagLocations.php b/app/Console/Commands/Upgrade/UpgradesTagLocations.php
index ef2fbd28de..3756ec092f 100644
--- a/app/Console/Commands/Upgrade/UpgradesTagLocations.php
+++ b/app/Console/Commands/Upgrade/UpgradesTagLocations.php
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Location;
use FireflyIII\Models\Tag;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTagLocations extends Command
{
@@ -57,7 +58,7 @@ class UpgradesTagLocations extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -97,6 +98,6 @@ class UpgradesTagLocations extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesToGroups.php b/app/Console/Commands/Upgrade/UpgradesToGroups.php
index accae5e614..a3fd772afb 100644
--- a/app/Console/Commands/Upgrade/UpgradesToGroups.php
+++ b/app/Console/Commands/Upgrade/UpgradesToGroups.php
@@ -39,6 +39,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesToGroups extends Command
{
@@ -97,7 +98,7 @@ class UpgradesToGroups extends Command
private function isMigrated(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -379,6 +380,6 @@ class UpgradesToGroups extends Command
private function markAsMigrated(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesTransferCurrencies.php b/app/Console/Commands/Upgrade/UpgradesTransferCurrencies.php
index 9e796b82c7..1fbd7dbafb 100644
--- a/app/Console/Commands/Upgrade/UpgradesTransferCurrencies.php
+++ b/app/Console/Commands/Upgrade/UpgradesTransferCurrencies.php
@@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTransferCurrencies extends Command
{
@@ -105,7 +106,7 @@ class UpgradesTransferCurrencies extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -480,6 +481,6 @@ class UpgradesTransferCurrencies extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesVariousCurrencyInformation.php b/app/Console/Commands/Upgrade/UpgradesVariousCurrencyInformation.php
index 5a157029d1..6b72e47e6b 100644
--- a/app/Console/Commands/Upgrade/UpgradesVariousCurrencyInformation.php
+++ b/app/Console/Commands/Upgrade/UpgradesVariousCurrencyInformation.php
@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesVariousCurrencyInformation extends Command
{
@@ -86,7 +87,7 @@ class UpgradesVariousCurrencyInformation extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -246,6 +247,6 @@ class UpgradesVariousCurrencyInformation extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Console/Commands/Upgrade/UpgradesWebhooks.php b/app/Console/Commands/Upgrade/UpgradesWebhooks.php
index abbcc8cd34..826aaa9be9 100644
--- a/app/Console/Commands/Upgrade/UpgradesWebhooks.php
+++ b/app/Console/Commands/Upgrade/UpgradesWebhooks.php
@@ -34,6 +34,7 @@ use FireflyIII\Models\WebhookDelivery as WebhookDeliveryModel;
use FireflyIII\Models\WebhookResponse as WebhookResponseModel;
use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel;
use Illuminate\Console\Command;
+use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesWebhooks extends Command
{
@@ -63,7 +64,7 @@ class UpgradesWebhooks extends Command
private function isExecuted(): bool
{
- $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
+ $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
@@ -109,6 +110,6 @@ class UpgradesWebhooks extends Command
private function markAsExecuted(): void
{
- \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
+ FireflyConfig::set(self::CONFIG_NAME, true);
}
}
diff --git a/app/Handlers/Events/AdminEventHandler.php b/app/Handlers/Events/AdminEventHandler.php
index 807019e794..eb713c7524 100644
--- a/app/Handlers/Events/AdminEventHandler.php
+++ b/app/Handlers/Events/AdminEventHandler.php
@@ -37,6 +37,7 @@ use FireflyIII\Notifications\Test\OwnerTestNotificationPushover;
use FireflyIII\Notifications\Test\OwnerTestNotificationSlack;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class AdminEventHandler.
@@ -45,7 +46,7 @@ class AdminEventHandler
{
public function sendInvitationNotification(InvitationCreated $event): void
{
- $sendMail = \FireflyIII\Support\Facades\FireflyConfig::get('notification_invite_created', true)->data;
+ $sendMail = FireflyConfig::get('notification_invite_created', true)->data;
if (false === $sendMail) {
return;
}
@@ -96,7 +97,7 @@ class AdminEventHandler
*/
public function sendNewVersion(NewVersionAvailable $event): void
{
- $sendMail = \FireflyIII\Support\Facades\FireflyConfig::get('notification_new_version', true)->data;
+ $sendMail = FireflyConfig::get('notification_new_version', true)->data;
if (false === $sendMail) {
return;
}
diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php
index b1833b65e2..d72de4e307 100644
--- a/app/Handlers/Events/UserEventHandler.php
+++ b/app/Handlers/Events/UserEventHandler.php
@@ -57,6 +57,7 @@ use Illuminate\Auth\Events\Login;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class UserEventHandler.
@@ -224,7 +225,7 @@ class UserEventHandler
public function sendAdminRegistrationNotification(RegisteredUser $event): void
{
- $sendMail = (bool)\FireflyIII\Support\Facades\FireflyConfig::get('notification_admin_new_reg', true)->data;
+ $sendMail = (bool)FireflyConfig::get('notification_admin_new_reg', true)->data;
if ($sendMail) {
$owner = $event->owner;
@@ -367,7 +368,7 @@ class UserEventHandler
*/
public function sendRegistrationMail(RegisteredUser $event): void
{
- $sendMail = (bool)\FireflyIII\Support\Facades\FireflyConfig::get('notification_user_new_reg', true)->data;
+ $sendMail = (bool)FireflyConfig::get('notification_user_new_reg', true)->data;
if ($sendMail) {
try {
Notification::send($event->user, new UserRegistrationNotification());
diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php
index d15fca083b..e5a681aefc 100644
--- a/app/Handlers/Events/VersionCheckEventHandler.php
+++ b/app/Handlers/Events/VersionCheckEventHandler.php
@@ -33,6 +33,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class VersionCheckEventHandler
@@ -54,7 +55,7 @@ class VersionCheckEventHandler
Log::debug('Now in checkForUpdates()');
// should not check for updates:
- $permission = \FireflyIII\Support\Facades\FireflyConfig::get('permission_update_check', -1);
+ $permission = FireflyConfig::get('permission_update_check', -1);
$value = (int) $permission->data;
if (1 !== $value) {
Log::debug('Update check is not enabled.');
@@ -73,7 +74,7 @@ class VersionCheckEventHandler
}
/** @var Configuration $lastCheckTime */
- $lastCheckTime = \FireflyIII\Support\Facades\FireflyConfig::get('last_update_check', Carbon::now()->getTimestamp());
+ $lastCheckTime = FireflyConfig::get('last_update_check', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last check time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -87,7 +88,7 @@ class VersionCheckEventHandler
$release = $this->getLatestRelease();
session()->flash($release['level'], $release['message']);
- \FireflyIII\Support\Facades\FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp());
+ FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp());
}
/**
@@ -107,7 +108,7 @@ class VersionCheckEventHandler
}
/** @var Configuration $lastCheckTime */
- $lastCheckTime = \FireflyIII\Support\Facades\FireflyConfig::get('last_update_warning', Carbon::now()->getTimestamp());
+ $lastCheckTime = FireflyConfig::get('last_update_warning', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last warning time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -120,6 +121,6 @@ class VersionCheckEventHandler
Log::debug('Have warned about a new version in four weeks!');
session()->flash('info', (string) trans('firefly.disabled_but_check'));
- \FireflyIII\Support\Facades\FireflyConfig::set('last_update_warning', Carbon::now()->getTimestamp());
+ FireflyConfig::set('last_update_warning', Carbon::now()->getTimestamp());
}
}
diff --git a/app/Handlers/Events/WebhookEventHandler.php b/app/Handlers/Events/WebhookEventHandler.php
index db1a25fd44..341258bfb7 100644
--- a/app/Handlers/Events/WebhookEventHandler.php
+++ b/app/Handlers/Events/WebhookEventHandler.php
@@ -27,6 +27,7 @@ namespace FireflyIII\Handlers\Events;
use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\WebhookMessage;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class WebhookEventHandler
@@ -39,7 +40,7 @@ class WebhookEventHandler
public function sendWebhookMessages(): void
{
Log::debug(sprintf('Now in %s', __METHOD__));
- if (false === config('firefly.feature_flags.webhooks') || false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === config('firefly.feature_flags.webhooks') || false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::debug('Webhook event handler is disabled, do not run sendWebhookMessages().');
return;
diff --git a/app/Handlers/Observer/TransactionObserver.php b/app/Handlers/Observer/TransactionObserver.php
index bca1eb866f..63ffebfd1a 100644
--- a/app/Handlers/Observer/TransactionObserver.php
+++ b/app/Handlers/Observer/TransactionObserver.php
@@ -28,6 +28,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class TransactionObserver
@@ -39,7 +40,7 @@ class TransactionObserver
public function created(Transaction $transaction): void
{
Log::debug('Observe "created" of a transaction.');
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) {
+ if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) {
Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
}
@@ -82,7 +83,7 @@ class TransactionObserver
public function updated(Transaction $transaction): void
{
// Log::debug('Observe "updated" of a transaction.');
- if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && self::$recalculate && 1 === bccomp($transaction->amount, '0')) {
+ if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && self::$recalculate && 1 === bccomp($transaction->amount, '0')) {
Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
}
diff --git a/app/Helpers/Update/UpdateTrait.php b/app/Helpers/Update/UpdateTrait.php
index f94ce56e80..e21de39b55 100644
--- a/app/Helpers/Update/UpdateTrait.php
+++ b/app/Helpers/Update/UpdateTrait.php
@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Update;
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Trait UpdateTrait
@@ -43,7 +44,7 @@ trait UpdateTrait
/** @var UpdateRequestInterface $checker */
$checker = app(UpdateRequestInterface::class);
- $channelConfig = \FireflyIII\Support\Facades\FireflyConfig::get('update_channel', 'stable');
+ $channelConfig = FireflyConfig::get('update_channel', 'stable');
$channel = (string) $channelConfig->data;
return $checker->getUpdateInformation($channel);
diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php
index fd9ba3063d..7adb10426b 100644
--- a/app/Http/Controllers/Admin/ConfigurationController.php
+++ b/app/Http/Controllers/Admin/ConfigurationController.php
@@ -61,25 +61,25 @@ class ConfigurationController extends Controller
*
* @return Factory|View
*/
- public function index(): Factory | \Illuminate\Contracts\View\View
+ public function index(): Factory|\Illuminate\Contracts\View\View
{
- $subTitle = (string)trans('firefly.instance_configuration');
- $subTitleIcon = 'fa-wrench';
+ $subTitle = (string)trans('firefly.instance_configuration');
+ $subTitleIcon = 'fa-wrench';
Log::channel('audit')->info('User visits admin config index.');
// all available configuration and their default value in case
// they don't exist yet.
- $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
- $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
- $siteOwner = config('firefly.site_owner');
+ $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
+ $siteOwner = config('firefly.site_owner');
$enableExchangeRates = FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$useRunningBalance = FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data;
$enableExternalMap = FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
$enableExternalRates = FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data;
$allowWebhooks = FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data;
- $validUrlProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;;
+ $validUrlProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return view(
'settings.configuration.index',
diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php
index eee9c0f498..1a1e96f2f9 100644
--- a/app/Http/Controllers/Admin/UserController.php
+++ b/app/Http/Controllers/Admin/UserController.php
@@ -42,6 +42,7 @@ use Illuminate\Routing\Redirector;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class UserController.
@@ -164,7 +165,7 @@ class UserController extends Controller
$subTitle = (string) trans('firefly.user_administration');
$subTitleIcon = 'fa-users';
$users = $this->repository->all();
- $singleUserMode = (bool) \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $singleUserMode = (bool) FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$allowInvites = false;
if (!$this->externalIdentity && $singleUserMode) {
// also registration enabled.
diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php
index c55665f712..14810e8e35 100644
--- a/app/Http/Controllers/Auth/ForgotPasswordController.php
+++ b/app/Http/Controllers/Auth/ForgotPasswordController.php
@@ -36,6 +36,7 @@ use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url;
@@ -142,7 +143,7 @@ class ForgotPasswordController extends Controller
}
// is allowed to?
- $singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$userCount = User::count();
$allowRegistration = true;
$pageTitle = (string) trans('firefly.forgot_pw_page_title');
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 94c034b108..44d67f9a26 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -50,6 +50,7 @@ use Illuminate\Validation\ValidationException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\HttpFoundation\Response as ResponseAlias;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class LoginController
@@ -236,7 +237,7 @@ class LoginController extends Controller
}
// is allowed to register, etc.
- $singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$allowRegistration = true;
$allowReset = true;
if (true === $singleUserMode && $count > 0) {
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index fe431c500a..69c0258d2d 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -41,6 +41,7 @@ use Illuminate\Validation\ValidationException;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class RegisterController
@@ -121,7 +122,7 @@ class RegisterController extends Controller
$allowRegistration = true;
try {
- $singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
} catch (ContainerExceptionInterface|NotFoundExceptionInterface) {
$singleUserMode = true;
}
@@ -148,7 +149,7 @@ class RegisterController extends Controller
*/
public function showInviteForm(Request $request, string $code): Factory|\Illuminate\Contracts\View\View
{
- $isDemoSite = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
+ $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$pageTitle = (string) trans('firefly.register_page_title');
$repository = app(UserRepositoryInterface::class);
$allowRegistration = $this->allowedToRegister();
@@ -182,7 +183,7 @@ class RegisterController extends Controller
*/
public function showRegistrationForm(?Request $request = null): Factory|\Illuminate\Contracts\View\View
{
- $isDemoSite = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
+ $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$pageTitle = (string) trans('firefly.register_page_title');
$allowRegistration = $this->allowedToRegister();
diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php
index f9204c9d99..8e4d7eb7f7 100644
--- a/app/Http/Controllers/Auth/ResetPasswordController.php
+++ b/app/Http/Controllers/Auth/ResetPasswordController.php
@@ -36,6 +36,7 @@ use Illuminate\Validation\ValidationException;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class ResetPasswordController
@@ -131,7 +132,7 @@ class ResetPasswordController extends Controller
}
// is allowed to register?
- $singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
+ $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$userCount = User::count();
$allowRegistration = true;
$pageTitle = (string) trans('firefly.reset_pw_page_title');
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index 2fd0076d0e..5da60a33ab 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -38,6 +38,7 @@ use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\View;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\ini_get;
use function Safe\realpath;
@@ -71,7 +72,7 @@ abstract class Controller extends BaseController
public function __construct()
{
// is site a demo site?
- $isDemoSiteConfig = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site', false));
+ $isDemoSiteConfig = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site', false));
$isDemoSite = (bool) $isDemoSiteConfig->data;
View::share('IS_DEMO_SITE', $isDemoSite);
View::share('DEMO_USERNAME', config('firefly.demo_username'));
@@ -80,7 +81,7 @@ abstract class Controller extends BaseController
View::share('FF_BUILD_TIME', config('firefly.build_time'));
// is webhooks enabled?
- View::share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data);
+ View::share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data);
// share custom auth guard info.
$authGuard = config('firefly.authentication_guard');
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php
index c3f96fc3a2..a4da0d865a 100644
--- a/app/Http/Controllers/DebugController.php
+++ b/app/Http/Controllers/DebugController.php
@@ -51,6 +51,7 @@ use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler;
use Safe\Exceptions\FilesystemException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\file_get_contents;
use function Safe\ini_get;
@@ -241,7 +242,7 @@ class DebugController extends Controller
{
$userGuard = config('auth.defaults.guard');
- $config = \FireflyIII\Support\Facades\FireflyConfig::get('last_rt_job', 0);
+ $config = FireflyConfig::get('last_rt_job', 0);
$lastTime = (int) $config->data;
$lastCronjob = 'never';
$lastCronjobAgo = 'never';
diff --git a/app/Http/Controllers/ExchangeRates/IndexController.php b/app/Http/Controllers/ExchangeRates/IndexController.php
index a83737a21a..31c763e241 100644
--- a/app/Http/Controllers/ExchangeRates/IndexController.php
+++ b/app/Http/Controllers/ExchangeRates/IndexController.php
@@ -28,6 +28,7 @@ use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\TransactionCurrency;
use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
class IndexController extends Controller
{
@@ -47,7 +48,7 @@ class IndexController extends Controller
return $next($request);
}
);
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
+ if (false === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
throw new NotFoundHttpException();
}
}
diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php
index 80e26160ab..499c033008 100644
--- a/app/Http/Controllers/Transaction/CreateController.php
+++ b/app/Http/Controllers/Transaction/CreateController.php
@@ -38,6 +38,7 @@ use Illuminate\Http\Request;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url;
@@ -140,7 +141,7 @@ class CreateController extends Controller
];
$optionalFields['external_url'] ??= false;
$optionalFields['location'] ??= false;
- $optionalFields['location'] = $optionalFields['location'] && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
+ $optionalFields['location'] = $optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
// map info:
$longitude = config('firefly.default_location.longitude');
diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php
index e1332c67da..c7064c8459 100644
--- a/app/Http/Controllers/Transaction/EditController.php
+++ b/app/Http/Controllers/Transaction/EditController.php
@@ -38,6 +38,7 @@ use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException;
+use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url;
@@ -114,7 +115,7 @@ class EditController extends Controller
];
$optionalFields['external_url'] ??= false;
$optionalFields['location'] ??= false;
- $optionalFields['location'] = $optionalFields['location'] && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
+ $optionalFields['location'] = $optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
// map info voor v2:
$longitude = config('firefly.default_location.longitude');
diff --git a/app/Http/Controllers/Webhooks/CreateController.php b/app/Http/Controllers/Webhooks/CreateController.php
index d25cd8e0fa..bdae300496 100644
--- a/app/Http/Controllers/Webhooks/CreateController.php
+++ b/app/Http/Controllers/Webhooks/CreateController.php
@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class CreateController
@@ -59,7 +60,7 @@ class CreateController extends Controller
*/
public function index(): Factory|\Illuminate\Contracts\View\View
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook create page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Http/Controllers/Webhooks/DeleteController.php b/app/Http/Controllers/Webhooks/DeleteController.php
index 055d6bc661..c8b399879a 100644
--- a/app/Http/Controllers/Webhooks/DeleteController.php
+++ b/app/Http/Controllers/Webhooks/DeleteController.php
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class DeleteController
@@ -64,7 +65,7 @@ class DeleteController extends Controller
*/
public function index(Webhook $webhook): Factory|View
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook delete page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Http/Controllers/Webhooks/EditController.php b/app/Http/Controllers/Webhooks/EditController.php
index b8ad6bf40b..a00497b7de 100644
--- a/app/Http/Controllers/Webhooks/EditController.php
+++ b/app/Http/Controllers/Webhooks/EditController.php
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class EditController
@@ -63,7 +64,7 @@ class EditController extends Controller
*/
public function index(Webhook $webhook): Factory|View
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook edit page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Http/Controllers/Webhooks/IndexController.php b/app/Http/Controllers/Webhooks/IndexController.php
index f264c59556..5211a3a89b 100644
--- a/app/Http/Controllers/Webhooks/IndexController.php
+++ b/app/Http/Controllers/Webhooks/IndexController.php
@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class IndexController
@@ -55,7 +56,7 @@ class IndexController extends Controller
*/
public function index(): Factory|\Illuminate\Contracts\View\View
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook index page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Http/Controllers/Webhooks/ShowController.php b/app/Http/Controllers/Webhooks/ShowController.php
index 4de27b139b..f0bc69a4cb 100644
--- a/app/Http/Controllers/Webhooks/ShowController.php
+++ b/app/Http/Controllers/Webhooks/ShowController.php
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class ShowController
@@ -63,7 +64,7 @@ class ShowController extends Controller
*/
public function index(Webhook $webhook): Factory|View
{
- if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
+ if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User visits webhook #%d page, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.');
diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php
index 9ba6ad25e8..3f8c30d595 100644
--- a/app/Http/Middleware/Range.php
+++ b/app/Http/Middleware/Range.php
@@ -34,6 +34,7 @@ use FireflyIII\Support\Http\Controllers\RequestInformation;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class SessionFilter.
@@ -144,11 +145,11 @@ class Range
// share security message:
if (
- \FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_message')
- && \FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_level')
+ FireflyConfig::has('upgrade_security_message')
+ && FireflyConfig::has('upgrade_security_level')
) {
- app('view')->share('upgrade_security_message', \FireflyIII\Support\Facades\FireflyConfig::get('upgrade_security_message')->data);
- app('view')->share('upgrade_security_level', \FireflyIII\Support\Facades\FireflyConfig::get('upgrade_security_level')->data);
+ app('view')->share('upgrade_security_message', FireflyConfig::get('upgrade_security_message')->data);
+ app('view')->share('upgrade_security_level', FireflyConfig::get('upgrade_security_level')->data);
}
}
}
diff --git a/app/Http/Requests/ConfigurationRequest.php b/app/Http/Requests/ConfigurationRequest.php
index 346a5ed261..1ac957a441 100644
--- a/app/Http/Requests/ConfigurationRequest.php
+++ b/app/Http/Requests/ConfigurationRequest.php
@@ -41,7 +41,7 @@ class ConfigurationRequest extends FormRequest
public function getConfigurationData(): array
{
return [
- 'single_user_mode' => $this->boolean('single_user_mode'),
+ 'single_user_mode' => $this->boolean('single_user_mode'),
'enable_exchange_rates' => $this->boolean('enable_exchange_rates'),
'use_running_balance' => $this->boolean('use_running_balance'),
@@ -50,8 +50,8 @@ class ConfigurationRequest extends FormRequest
'enable_external_rates' => $this->boolean('enable_external_rates'),
'allow_webhooks' => $this->boolean('allow_webhooks'),
- 'valid_url_protocols' => $this->string('valid_url_protocols'),
- 'is_demo_site' => $this->boolean('is_demo_site'),
+ 'valid_url_protocols' => $this->string('valid_url_protocols'),
+ 'is_demo_site' => $this->boolean('is_demo_site'),
];
}
@@ -62,7 +62,7 @@ class ConfigurationRequest extends FormRequest
{
// fixed
return [
- 'single_user_mode' => 'min:0|max:1|numeric',
+ 'single_user_mode' => 'min:0|max:1|numeric',
'enable_exchange_rates' => 'min:0|max:1|numeric',
'use_running_balance' => 'min:0|max:1|numeric',
@@ -71,8 +71,8 @@ class ConfigurationRequest extends FormRequest
'enable_external_rates' => 'min:0|max:1|numeric',
'allow_webhooks' => 'min:0|max:1|numeric',
- 'valid_url_protocols' => 'min:0|max:255',
- 'is_demo_site' => 'min:0|max:1|numeric',
+ 'valid_url_protocols' => 'min:0|max:255',
+ 'is_demo_site' => 'min:0|max:1|numeric',
];
diff --git a/app/Notifications/Notifiables/OwnerNotifiable.php b/app/Notifications/Notifiables/OwnerNotifiable.php
index 5e82e725d3..9216c19015 100644
--- a/app/Notifications/Notifiables/OwnerNotifiable.php
+++ b/app/Notifications/Notifiables/OwnerNotifiable.php
@@ -28,6 +28,7 @@ use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use NotificationChannels\Pushover\PushoverReceiver;
+use FireflyIII\Support\Facades\FireflyConfig;
class OwnerNotifiable
{
@@ -58,8 +59,8 @@ class OwnerNotifiable
public function routeNotificationForPushover(): PushoverReceiver
{
Log::debug('Return settings for routeNotificationForPushover');
- $pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data;
- $pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data;
+ $pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
+ $pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
return PushoverReceiver::withUserKey($pushoverUserToken)
->withApplicationToken($pushoverAppToken)
@@ -68,7 +69,7 @@ class OwnerNotifiable
public function routeNotificationForSlack(): string
{
- $res = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
+ $res = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (is_array($res)) {
$res = '';
}
diff --git a/app/Notifications/ReturnsAvailableChannels.php b/app/Notifications/ReturnsAvailableChannels.php
index 7341b5b04d..2ca7f0e0b6 100644
--- a/app/Notifications/ReturnsAvailableChannels.php
+++ b/app/Notifications/ReturnsAvailableChannels.php
@@ -29,6 +29,7 @@ use FireflyIII\Support\Notifications\UrlValidator;
use FireflyIII\User;
use Illuminate\Support\Facades\Log;
use NotificationChannels\Pushover\PushoverChannel;
+use FireflyIII\Support\Facades\FireflyConfig;
// use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel;
@@ -54,7 +55,7 @@ class ReturnsAvailableChannels
$channels = ['mail'];
if (true === config('notifications.channels.slack.enabled', false)) {
- $slackUrl = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
+ $slackUrl = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (UrlValidator::isValidWebhookURL($slackUrl)) {
$channels[] = 'slack';
}
@@ -73,8 +74,8 @@ class ReturnsAvailableChannels
// pushover
if (true === config('notifications.channels.pushover.enabled', false)) {
- $pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data;
- $pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data;
+ $pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
+ $pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
if ('' === $pushoverAppToken || '' === $pushoverUserToken) {
Log::warning('[b] No Pushover token, channel is disabled.');
}
diff --git a/app/Providers/SearchServiceProvider.php b/app/Providers/SearchServiceProvider.php
index 295c00c936..32f4850864 100644
--- a/app/Providers/SearchServiceProvider.php
+++ b/app/Providers/SearchServiceProvider.php
@@ -52,12 +52,12 @@ class SearchServiceProvider extends ServiceProvider
static function (): QueryParserInterface {
return app(QueryParser::class);
// 2025-12-20 ignore this setting.
-// $implementation = config('search.query_parser');
-//
-// return match ($implementation) {
-// 'new' => app(QueryParser::class),
-// default => app(GdbotsQueryParser::class),
-// };
+ // $implementation = config('search.query_parser');
+ //
+ // return match ($implementation) {
+ // 'new' => app(QueryParser::class),
+ // default => app(GdbotsQueryParser::class),
+ // };
}
);
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index 5bb7815df0..5858407750 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -35,6 +35,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use NumberFormatter;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class Amount.
@@ -117,7 +118,7 @@ class Amount
if (!$user instanceof User) {
$pref = $instance->getPreference('convert_to_primary_no_user');
if (null === $pref) {
- $res = true === Preferences::get('convert_to_primary', false)->data && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
+ $res = true === Preferences::get('convert_to_primary', false)->data && true === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$instance->setPreference('convert_to_primary_no_user', $res);
return $res;
@@ -128,7 +129,7 @@ class Amount
$key = sprintf('convert_to_primary_%d', $user->id);
$pref = $instance->getPreference($key);
if (null === $pref) {
- $res = true === Preferences::getForUser($user, 'convert_to_primary', false)->data && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
+ $res = true === Preferences::getForUser($user, 'convert_to_primary', false)->data && true === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$instance->setPreference($key, $res);
return $res;
diff --git a/app/Support/Http/Api/ExchangeRateConverter.php b/app/Support/Http/Api/ExchangeRateConverter.php
index 5fb488d223..752aafd3b0 100644
--- a/app/Support/Http/Api/ExchangeRateConverter.php
+++ b/app/Support/Http/Api/ExchangeRateConverter.php
@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\Steam;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Class ExchangeRateConverter
@@ -71,7 +72,7 @@ class ExchangeRateConverter
public function enabled(): bool
{
- return false !== \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data || $this->ignoreSettings;
+ return false !== FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data || $this->ignoreSettings;
}
/**
diff --git a/app/Support/System/GeneratesInstallationId.php b/app/Support/System/GeneratesInstallationId.php
index 2a5fc8eedf..93cde62b2e 100644
--- a/app/Support/System/GeneratesInstallationId.php
+++ b/app/Support/System/GeneratesInstallationId.php
@@ -27,6 +27,7 @@ namespace FireflyIII\Support\System;
use Illuminate\Support\Facades\Log;
use FireflyIII\Exceptions\FireflyException;
use Ramsey\Uuid\Uuid;
+use FireflyIII\Support\Facades\FireflyConfig;
/**
* Trait GeneratesInstallationId
@@ -36,7 +37,7 @@ trait GeneratesInstallationId
protected function generateInstallationId(): void
{
try {
- $config = \FireflyIII\Support\Facades\FireflyConfig::get('installation_id');
+ $config = FireflyConfig::get('installation_id');
} catch (FireflyException) {
Log::info('Could not create or generate installation ID. Do not continue.');
@@ -52,7 +53,7 @@ trait GeneratesInstallationId
$uuid4 = Uuid::uuid4();
$uniqueId = (string)$uuid4;
Log::info(sprintf('Created Firefly III installation ID %s', $uniqueId));
- \FireflyIII\Support\Facades\FireflyConfig::set('installation_id', $uniqueId);
+ FireflyConfig::set('installation_id', $uniqueId);
}
}
}
diff --git a/app/User.php b/app/User.php
index 12a3ed2ee1..4d1a0c55bd 100644
--- a/app/User.php
+++ b/app/User.php
@@ -404,7 +404,7 @@ class User extends Authenticatable
public function routeNotificationForSlack(Notification $notification): ?string
{
// this check does not validate if the user is owner, Should be done by notification itself.
- $res = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
+ $res = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (is_array($res)) {
$res = '';
}
diff --git a/config/firefly.php b/config/firefly.php
index 9cde0fef73..088fbbfa1a 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
- 'version' => 'develop/2025-12-19',
- 'build_time' => 1766164572,
+ 'version' => 'develop/2025-12-20',
+ 'build_time' => 1766210708,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.
diff --git a/package-lock.json b/package-lock.json
index 78072dae5f..79cf4ad7e5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10129,9 +10129,9 @@
"license": "MIT"
},
"node_modules/sass": {
- "version": "1.97.0",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.0.tgz",
- "integrity": "sha512-KR0igP1z4avUJetEuIeOdDlwaUDvkH8wSx7FdSjyYBS3dpyX3TzHfAMO0G1Q4/3cdjcmi3r7idh+KCmKqS+KeQ==",
+ "version": "1.97.1",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.1.tgz",
+ "integrity": "sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==",
"dev": true,
"license": "MIT",
"dependencies": {