Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2026-01-18

JC5d1b167447b0d
diff --git a/app/Events/Model/Subscription/SubscriptionNeedsExtensionOrRenewal.php b/app/Events/Model/Subscription/SubscriptionNeedsExtensionOrRenewal.php
index 7c6bfb2ac7..83af30f040 100644
--- a/app/Events/Model/Subscription/SubscriptionNeedsExtensionOrRenewal.php
+++ b/app/Events/Model/Subscription/SubscriptionNeedsExtensionOrRenewal.php
@@ -1,4 +1,5 @@
<?php
+
/*
* SubscriptionNeedsExtensionOrRenewal.php
* Copyright (c) 2026 [email protected]
diff --git a/app/Events/Model/Subscription/SubscriptionsAreOverdueForPayment.php b/app/Events/Model/Subscription/SubscriptionsAreOverdueForPayment.php
index 3abbbcf774..0fcd088fc9 100644
--- a/app/Events/Model/Subscription/SubscriptionsAreOverdueForPayment.php
+++ b/app/Events/Model/Subscription/SubscriptionsAreOverdueForPayment.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/*
* SubscriptionIsOverdueForPayment.php
* Copyright (c) 2026 [email protected]
diff --git a/app/Jobs/WarnAboutBills.php b/app/Jobs/WarnAboutBills.php
index 777d596e08..e41f2a7fee 100644
--- a/app/Jobs/WarnAboutBills.php
+++ b/app/Jobs/WarnAboutBills.php
@@ -56,12 +56,12 @@ class WarnAboutBills implements ShouldQueue
*/
public function __construct(?Carbon $date)
{
- $newDate = new Carbon();
+ $newDate = new Carbon();
$newDate->startOfDay();
- $this->date = $newDate;
+ $this->date = $newDate;
if ($date instanceof Carbon) {
- $newDate = clone $date;
+ $newDate = clone $date;
$newDate->startOfDay();
$this->date = $newDate;
}
@@ -148,7 +148,7 @@ class WarnAboutBills implements ShouldQueue
public function setDate(Carbon $date): void
{
- $newDate = clone $date;
+ $newDate = clone $date;
$newDate->startOfDay();
$this->date = $newDate;
}
@@ -170,7 +170,7 @@ class WarnAboutBills implements ShouldQueue
$enrichment->setEnd($end);
/** @var Bill $single */
- $single = $enrichment->enrichSingle($bill);
+ $single = $enrichment->enrichSingle($bill);
return [
'pay_dates' => $single->meta['pay_dates'] ?? [],
@@ -180,7 +180,7 @@ class WarnAboutBills implements ShouldQueue
private function needsOverdueAlert(array $dates): bool
{
- $count = count($dates['pay_dates']) - count($dates['paid_dates']);
+ $count = count($dates['pay_dates']) - count($dates['paid_dates']);
if (0 === $count || 0 === count($dates['pay_dates'])) {
return false;
}
@@ -188,7 +188,7 @@ class WarnAboutBills implements ShouldQueue
$earliest = new Carbon($dates['pay_dates'][0]);
$earliest->startOfDay();
Log::debug(sprintf('Earliest expected pay date is %s', $earliest->toAtomString()));
- $diff = $earliest->diffInDays($this->date);
+ $diff = $earliest->diffInDays($this->date);
Log::debug(sprintf('Difference in days is %s', $diff));
return $diff >= 6; // FIXME hard coded value.
diff --git a/app/Listeners/Model/Subscription/NotifiesAboutExtensionOrRenewal.php b/app/Listeners/Model/Subscription/NotifiesAboutExtensionOrRenewal.php
index 362bafa516..debd603f41 100644
--- a/app/Listeners/Model/Subscription/NotifiesAboutExtensionOrRenewal.php
+++ b/app/Listeners/Model/Subscription/NotifiesAboutExtensionOrRenewal.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/*
* NotifiesAboutExtensionOrRenewal.php
* Copyright (c) 2026 [email protected]
@@ -35,8 +37,9 @@ class NotifiesAboutExtensionOrRenewal implements ShouldQueue
{
Log::debug(sprintf('Now in %s', __METHOD__));
$subscription = $event->subscription;
+
/** @var bool $preference */
- $preference = Preferences::getForUser($subscription->user, 'notification_bill_reminder', true)->data;
+ $preference = Preferences::getForUser($subscription->user, 'notification_bill_reminder', true)->data;
if (true === $preference) {
Log::debug('Subscription reminder is true!');
@@ -63,5 +66,4 @@ class NotifiesAboutExtensionOrRenewal implements ShouldQueue
}
Log::debug('User has disabled subscription reminders.');
}
-
}
diff --git a/app/Listeners/Model/Subscription/NotifiesAboutOverdueSubscriptions.php b/app/Listeners/Model/Subscription/NotifiesAboutOverdueSubscriptions.php
index 3f1b16821d..e5ee36b65c 100644
--- a/app/Listeners/Model/Subscription/NotifiesAboutOverdueSubscriptions.php
+++ b/app/Listeners/Model/Subscription/NotifiesAboutOverdueSubscriptions.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/*
* NotifiesAboutOverdueSubscription.php
* Copyright (c) 2026 [email protected]
@@ -36,15 +38,15 @@ class NotifiesAboutOverdueSubscriptions implements ShouldQueue
{
Log::debug(sprintf('Now in %s', __METHOD__));
// make sure user does not get the warning twice.
- $overdue = $event->overdue;
- $user = $event->user;
- $toBeWarned = [];
+ $overdue = $event->overdue;
+ $user = $event->user;
+ $toBeWarned = [];
Log::debug(sprintf('%d subscriptions to warn about.', count($overdue)));
foreach ($overdue as $item) {
/** @var Bill $bill */
- $bill = $item['bill'];
- $key = sprintf('bill_overdue_%s_%s', $bill->id, substr(hash('sha256', json_encode($item['dates']['pay_dates'], JSON_THROW_ON_ERROR)), 0, 10));
- $pref = Preferences::getForUser($bill->user, $key, false);
+ $bill = $item['bill'];
+ $key = sprintf('bill_overdue_%s_%s', $bill->id, substr(hash('sha256', json_encode($item['dates']['pay_dates'], JSON_THROW_ON_ERROR)), 0, 10));
+ $pref = Preferences::getForUser($bill->user, $key, false);
if (true === $pref->data) {
Log::debug(sprintf('User #%d has already been warned about overdue subscription #%d.', $bill->user->id, $bill->id));
@@ -96,5 +98,4 @@ class NotifiesAboutOverdueSubscriptions implements ShouldQueue
}
-
}
diff --git a/app/Support/Models/AccountBalanceCalculator.php b/app/Support/Models/AccountBalanceCalculator.php
index a7065d23c3..616c9d89ec 100644
--- a/app/Support/Models/AccountBalanceCalculator.php
+++ b/app/Support/Models/AccountBalanceCalculator.php
@@ -108,19 +108,21 @@ class AccountBalanceCalculator
->orderBy('transaction_journals.id', 'DESC')
->orderBy('transaction_journals.description', 'DESC')
->orderBy('transactions.amount', 'DESC')
- ->where('transactions.account_id', $accountId);
+ ->where('transactions.account_id', $accountId)
+ ;
$query->where('transaction_journals.date', '<', $notBefore);
$first = $query->first(['transactions.id', 'transactions.balance_dirty', 'transactions.transaction_currency_id', 'transaction_journals.date', 'transactions.account_id', 'transactions.amount', 'transactions.balance_after']);
- if(null === $first) {
+ if (null === $first) {
Log::debug(sprintf('Found no transactions for currency #%d and account #%d, return 0.', $currencyId, $accountId));
+
return '0';
}
$balance = (string)($first->balance_after ?? '0');
- Log::debug(sprintf('getLatestBalance: found balance: %s in transaction #%d on moment %s', Steam::bcround($balance,2), $first->id ?? 0, $notBefore->format('Y-m-d H:i:s')));
+ Log::debug(sprintf('getLatestBalance: found balance: %s in transaction #%d on moment %s', Steam::bcround($balance, 2), $first->id ?? 0, $notBefore->format('Y-m-d H:i:s')));
return $balance;
}
@@ -133,7 +135,7 @@ class AccountBalanceCalculator
Log::debug(sprintf('start of optimizedCalculation with date "%s"', $notBefore?->format('Y-m-d H:i:s')));
if ($accounts->count() > 0) {
- Log::debug(sprintf('Limited to %d account(s): %s', $accounts->count(), join(', ', $accounts->pluck('id')->toArray())));
+ Log::debug(sprintf('Limited to %d account(s): %s', $accounts->count(), implode(', ', $accounts->pluck('id')->toArray())));
}
// collect all transactions and the change they make.
$balances = [];
@@ -146,7 +148,8 @@ class AccountBalanceCalculator
->orderBy('transaction_journals.order', 'desc')
->orderBy('transaction_journals.id', 'asc')
->orderBy('transaction_journals.description', 'asc')
- ->orderBy('transactions.amount', 'asc');
+ ->orderBy('transactions.amount', 'asc')
+ ;
if ($accounts->count() > 0) {
$query->whereIn('transactions.account_id', $accounts->pluck('id')->toArray());
}
@@ -171,7 +174,7 @@ class AccountBalanceCalculator
$before = $balances[$entry->account_id][$entry->transaction_currency_id][0];
$after = bcadd($before, (string)$entry->amount);
- Log::debug(sprintf('Before:%s, after:%s', Steam::bcround($before,2), Steam::bcround($after, 2)));
+ Log::debug(sprintf('Before:%s, after:%s', Steam::bcround($before, 2), Steam::bcround($after, 2)));
if (true === $entry->balance_dirty || $accounts->count() > 0) {
// update the transaction:
diff --git a/config/firefly.php b/config/firefly.php
index c09bd4a0a1..1c0f75f304 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
- 'version' => 'develop/2026-01-17',
- 'build_time' => 1768662564,
+ 'version' => 'develop/2026-01-18',
+ 'build_time' => 1768729886,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.