🤖 Auto commit for release 'develop' on 2025-08-09

This commit is contained in:
JC5
2025-08-09 08:04:02 +02:00
parent 4dba9cea21
commit 3eeda4a6aa
14 changed files with 118 additions and 108 deletions

View File

@@ -54,7 +54,7 @@ class CronController extends Controller
$return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']); $return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']);
} }
$return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']); $return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']);
$return['webhooks'] = $this->webhookCronJob($config['force'], $config['date']); $return['webhooks'] = $this->webhookCronJob($config['force'], $config['date']);
return response()->api($return); return response()->api($return);
} }

View File

@@ -252,6 +252,7 @@ class Cron extends Command
$this->friendlyPositive(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message)); $this->friendlyPositive(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message));
} }
} }
private function webhookCronJob(bool $force, ?Carbon $date): void private function webhookCronJob(bool $force, ?Carbon $date): void
{ {
$webhook = new WebhookCronjob(); $webhook = new WebhookCronjob();

View File

@@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace FireflyIII\Events\Model\Bill; namespace FireflyIII\Events\Model\Bill;
use FireflyIII\Events\Event; use FireflyIII\Events\Event;

View File

@@ -40,15 +40,17 @@ class BillEventHandler
{ {
public function warnAboutOverdueSubscription(WarnUserAboutOverdueSubscription $event): void public function warnAboutOverdueSubscription(WarnUserAboutOverdueSubscription $event): void
{ {
$bill = $event->bill; $bill = $event->bill;
$dates = $event->dates; $dates = $event->dates;
$key = sprintf('bill_overdue_%s_%s', $bill->id, substr(hash('sha256', json_encode($dates['pay_dates'], JSON_THROW_ON_ERROR)), 0, 10)); $key = sprintf('bill_overdue_%s_%s', $bill->id, substr(hash('sha256', json_encode($dates['pay_dates'], JSON_THROW_ON_ERROR)), 0, 10));
$pref = Preferences::getForUser($bill->user, $key, false); $pref = Preferences::getForUser($bill->user, $key, false);
if (true === $pref->data) { if (true === $pref->data) {
Log::debug(sprintf('User %s has already been warned about overdue subscription %s.', $bill->user->id, $bill->id)); Log::debug(sprintf('User %s has already been warned about overdue subscription %s.', $bill->user->id, $bill->id));
return; return;
} }
/** @var bool $sendNotification */ /** @var bool $sendNotification */
$sendNotification = Preferences::getForUser($bill->user, 'notification_bill_reminder', true)->data; $sendNotification = Preferences::getForUser($bill->user, 'notification_bill_reminder', true)->data;
@@ -73,6 +75,7 @@ class BillEventHandler
Log::error($e->getMessage()); Log::error($e->getMessage());
Log::error($e->getTraceAsString()); Log::error($e->getTraceAsString());
} }
return; return;
} }
Log::debug('User has disabled bill reminders.'); Log::debug('User has disabled bill reminders.');
@@ -107,6 +110,7 @@ class BillEventHandler
Log::error($e->getMessage()); Log::error($e->getMessage());
Log::error($e->getTraceAsString()); Log::error($e->getTraceAsString());
} }
return; return;
} }
Log::debug('User has disabled bill reminders.'); Log::debug('User has disabled bill reminders.');

View File

@@ -50,7 +50,8 @@ class WebhookEventHandler
->get(['webhook_messages.*']) ->get(['webhook_messages.*'])
->filter( ->filter(
static fn (WebhookMessage $message) => $message->webhookAttempts()->count() <= 2 static fn (WebhookMessage $message) => $message->webhookAttempts()->count() <= 2
)->splice(0, 5); )->splice(0, 5)
;
Log::debug(sprintf('Found %d webhook message(s) ready to be send.', $messages->count())); Log::debug(sprintf('Found %d webhook message(s) ready to be send.', $messages->count()));
foreach ($messages as $message) { foreach ($messages as $message) {
if (false === $message->sent) { if (false === $message->sent) {

View File

@@ -73,26 +73,26 @@ class IndexController extends Controller
{ {
$this->cleanupObjectGroups(); $this->cleanupObjectGroups();
$this->repository->correctOrder(); $this->repository->correctOrder();
$start = session('start'); $start = session('start');
$end = session('end'); $end = session('end');
$collection = $this->repository->getBills(); $collection = $this->repository->getBills();
$total = $collection->count(); $total = $collection->count();
$parameters = new ParameterBag(); $parameters = new ParameterBag();
// sub one day from temp start so the last paid date is one day before it should be. // sub one day from temp start so the last paid date is one day before it should be.
$tempStart = clone $start; $tempStart = clone $start;
// 2023-06-23 do not sub one day from temp start, fix is in BillTransformer::payDates instead // 2023-06-23 do not sub one day from temp start, fix is in BillTransformer::payDates instead
// $tempStart->subDay(); // $tempStart->subDay();
// enrich // enrich
/** @var User $admin */ /** @var User $admin */
$admin = auth()->user(); $admin = auth()->user();
$enrichment = new SubscriptionEnrichment(); $enrichment = new SubscriptionEnrichment();
$enrichment->setUser($admin); $enrichment->setUser($admin);
$enrichment->setStart($tempStart); $enrichment->setStart($tempStart);
$enrichment->setEnd($end); $enrichment->setEnd($end);
$collection = $enrichment->enrich($collection); $collection = $enrichment->enrich($collection);
$parameters->set('start', $tempStart); $parameters->set('start', $tempStart);
@@ -105,21 +105,21 @@ class IndexController extends Controller
$transformer->setParameters($parameters); $transformer->setParameters($parameters);
// loop all bills, convert to array and add rules and stuff. // loop all bills, convert to array and add rules and stuff.
$rules = $this->repository->getRulesForBills($collection); $rules = $this->repository->getRulesForBills($collection);
// make bill groups: // make bill groups:
$bills = [ $bills = [
0 => [ // the index is the order, not the ID. 0 => [ // the index is the order, not the ID.
'object_group_id' => 0, 'object_group_id' => 0,
'object_group_title' => (string)trans('firefly.default_group_title_name'), 'object_group_title' => (string)trans('firefly.default_group_title_name'),
'bills' => [], 'bills' => [],
], ],
]; ];
/** @var Bill $bill */ /** @var Bill $bill */
foreach ($collection as $bill) { foreach ($collection as $bill) {
$array = $transformer->transform($bill); $array = $transformer->transform($bill);
$groupOrder = (int)$array['object_group_order']; $groupOrder = (int)$array['object_group_order'];
// make group array if necessary: // make group array if necessary:
$bills[$groupOrder] ??= [ $bills[$groupOrder] ??= [
'object_group_id' => $array['object_group_id'], 'object_group_id' => $array['object_group_id'],
@@ -141,9 +141,9 @@ class IndexController extends Controller
ksort($bills); ksort($bills);
// summarise per currency / per group. // summarise per currency / per group.
$sums = $this->getSums($bills); $sums = $this->getSums($bills);
$totals = $this->getTotals($sums); $totals = $this->getTotals($sums);
$today = now()->startOfDay(); $today = now()->startOfDay();
return view('bills.index', compact('bills', 'sums', 'total', 'totals', 'today')); return view('bills.index', compact('bills', 'sums', 'total', 'totals', 'today'));
} }
@@ -164,7 +164,7 @@ class IndexController extends Controller
continue; continue;
} }
$currencyId = $bill['currency_id']; $currencyId = $bill['currency_id'];
$sums[$groupOrder][$currencyId] ??= [ $sums[$groupOrder][$currencyId] ??= [
'currency_id' => $currencyId, 'currency_id' => $currencyId,
'currency_code' => $bill['currency_code'], 'currency_code' => $bill['currency_code'],
@@ -204,7 +204,7 @@ class IndexController extends Controller
private function amountPerPeriod(array $bill, string $range): string private function amountPerPeriod(array $bill, string $range): string
{ {
$avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2'); $avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2');
app('log')->debug(sprintf('Amount per period for bill #%d "%s"', $bill['id'], $bill['name'])); app('log')->debug(sprintf('Amount per period for bill #%d "%s"', $bill['id'], $bill['name']));
app('log')->debug(sprintf('Average is %s', $avg)); app('log')->debug(sprintf('Average is %s', $avg));
@@ -221,7 +221,7 @@ class IndexController extends Controller
app('log')->debug(sprintf('Amount per year is %s (%s * %s / %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1))); app('log')->debug(sprintf('Amount per year is %s (%s * %s / %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1)));
// per period: // per period:
$division = [ $division = [
'1Y' => '1', '1Y' => '1',
'6M' => '2', '6M' => '2',
'3M' => '4', '3M' => '4',
@@ -236,7 +236,7 @@ class IndexController extends Controller
'last90' => '4', 'last90' => '4',
'last365' => '1', 'last365' => '1',
]; ];
$perPeriod = bcdiv($yearAmount, $division[$range]); $perPeriod = bcdiv($yearAmount, $division[$range]);
app('log')->debug(sprintf('Amount per %s is %s (%s / %s)', $range, $perPeriod, $yearAmount, $division[$range])); app('log')->debug(sprintf('Amount per %s is %s (%s / %s)', $range, $perPeriod, $yearAmount, $division[$range]));
@@ -255,11 +255,11 @@ class IndexController extends Controller
*/ */
foreach ($sums as $array) { foreach ($sums as $array) {
/** /**
* @var int $currencyId * @var int $currencyId
* @var array $entry * @var array $entry
*/ */
foreach ($array as $currencyId => $entry) { foreach ($array as $currencyId => $entry) {
$totals[$currencyId] ??= [ $totals[$currencyId] ??= [
'currency_id' => $currencyId, 'currency_id' => $currencyId,
'currency_code' => $entry['currency_code'], 'currency_code' => $entry['currency_code'],
'currency_name' => $entry['currency_name'], 'currency_name' => $entry['currency_name'],

View File

@@ -145,7 +145,7 @@ abstract class Controller extends BaseController
View::share('original_route_name', Route::currentRouteName()); View::share('original_route_name', Route::currentRouteName());
// lottery to send any remaining webhooks: // lottery to send any remaining webhooks:
if(7 === random_int(1, 10)) { if (7 === random_int(1, 10)) {
// trigger event to send them: // trigger event to send them:
Log::debug('send event RequestedSendWebhookMessages through lottery'); Log::debug('send event RequestedSendWebhookMessages through lottery');
event(new RequestedSendWebhookMessages()); event(new RequestedSendWebhookMessages());

View File

@@ -55,12 +55,12 @@ class WarnAboutBills implements ShouldQueue
*/ */
public function __construct(?Carbon $date) public function __construct(?Carbon $date)
{ {
$newDate = new Carbon(); $newDate = new Carbon();
$newDate->startOfDay(); $newDate->startOfDay();
$this->date = $newDate; $this->date = $newDate;
if ($date instanceof Carbon) { if ($date instanceof Carbon) {
$newDate = clone $date; $newDate = clone $date;
$newDate->startOfDay(); $newDate->startOfDay();
$this->date = $newDate; $this->date = $newDate;
} }
@@ -148,7 +148,7 @@ class WarnAboutBills implements ShouldQueue
public function setDate(Carbon $date): void public function setDate(Carbon $date): void
{ {
$newDate = clone $date; $newDate = clone $date;
$newDate->startOfDay(); $newDate->startOfDay();
$this->date = $newDate; $this->date = $newDate;
} }
@@ -168,7 +168,8 @@ class WarnAboutBills implements ShouldQueue
$enrichment->setUser($bill->user); $enrichment->setUser($bill->user);
$enrichment->setStart($start); $enrichment->setStart($start);
$enrichment->setEnd($end); $enrichment->setEnd($end);
$single = $enrichment->enrichSingle($bill); $single = $enrichment->enrichSingle($bill);
return [ return [
'pay_dates' => $single->meta['pay_dates'] ?? [], 'pay_dates' => $single->meta['pay_dates'] ?? [],
'paid_dates' => $single->meta['paid_dates'] ?? [], 'paid_dates' => $single->meta['paid_dates'] ?? [],
@@ -177,19 +178,20 @@ class WarnAboutBills implements ShouldQueue
private function needsOverdueAlert(array $dates): bool 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'])) { if (0 === $count || 0 === count($dates['pay_dates'])) {
return false; return false;
} }
// the earliest date in the list of pay dates must be 48hrs or more ago. // the earliest date in the list of pay dates must be 48hrs or more ago.
$earliest = new Carbon($dates['pay_dates'][0]); $earliest = new Carbon($dates['pay_dates'][0]);
$earliest->startOfDay(); $earliest->startOfDay();
Log::debug(sprintf('Earliest expected pay date is %s' , $earliest->toAtomString())); 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)); Log::debug(sprintf('Difference in days is %s', $diff));
if ($diff < 2) { if ($diff < 2) {
return false; return false;
} }
return true; return true;
} }

View File

@@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace FireflyIII\Notifications\User; namespace FireflyIII\Notifications\User;
use Carbon\Carbon; use Carbon\Carbon;
@@ -42,9 +44,9 @@ class SubscriptionOverdueReminder extends Notification
); );
return new MailMessage() return new MailMessage()
->markdown('emails.subscription-overdue-warning', ['bill' => $this->bill,'dates' => $this->dates]) ->markdown('emails.subscription-overdue-warning', ['bill' => $this->bill, 'dates' => $this->dates])
->subject($this->getSubject()) ->subject($this->getSubject())
; ;
} }
private function getSubject(): string private function getSubject(): string
@@ -69,8 +71,8 @@ class SubscriptionOverdueReminder extends Notification
public function toPushover(User $notifiable): PushoverMessage public function toPushover(User $notifiable): PushoverMessage
{ {
return PushoverMessage::create((string) trans('email.bill_warning_please_action')) return PushoverMessage::create((string) trans('email.bill_warning_please_action'))
->title($this->getSubject()) ->title($this->getSubject())
; ;
} }
/** /**
@@ -87,7 +89,7 @@ class SubscriptionOverdueReminder extends Notification
$attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url); $attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url);
}) })
->content($this->getSubject()) ->content($this->getSubject())
; ;
} }
/** /**
@@ -97,5 +99,4 @@ class SubscriptionOverdueReminder extends Notification
{ {
return ReturnsAvailableChannels::returnChannels('user', $notifiable); return ReturnsAvailableChannels::returnChannels('user', $notifiable);
} }
} }

View File

@@ -115,92 +115,92 @@ class EventServiceProvider extends ServiceProvider
protected $listen protected $listen
= [ = [
// is a User related event. // is a User related event.
RegisteredUser::class => [ RegisteredUser::class => [
'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail', 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail',
'FireflyIII\Handlers\Events\UserEventHandler@sendAdminRegistrationNotification', 'FireflyIII\Handlers\Events\UserEventHandler@sendAdminRegistrationNotification',
'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole', 'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole',
'FireflyIII\Handlers\Events\UserEventHandler@createGroupMembership', 'FireflyIII\Handlers\Events\UserEventHandler@createGroupMembership',
'FireflyIII\Handlers\Events\UserEventHandler@createExchangeRates', 'FireflyIII\Handlers\Events\UserEventHandler@createExchangeRates',
], ],
UserAttemptedLogin::class => [ UserAttemptedLogin::class => [
'FireflyIII\Handlers\Events\UserEventHandler@sendLoginAttemptNotification', 'FireflyIII\Handlers\Events\UserEventHandler@sendLoginAttemptNotification',
], ],
// is a User related event. // is a User related event.
Login::class => [ Login::class => [
'FireflyIII\Handlers\Events\UserEventHandler@checkSingleUserIsAdmin', 'FireflyIII\Handlers\Events\UserEventHandler@checkSingleUserIsAdmin',
'FireflyIII\Handlers\Events\UserEventHandler@demoUserBackToEnglish', 'FireflyIII\Handlers\Events\UserEventHandler@demoUserBackToEnglish',
], ],
ActuallyLoggedIn::class => [ ActuallyLoggedIn::class => [
'FireflyIII\Handlers\Events\UserEventHandler@storeUserIPAddress', 'FireflyIII\Handlers\Events\UserEventHandler@storeUserIPAddress',
], ],
DetectedNewIPAddress::class => [ DetectedNewIPAddress::class => [
'FireflyIII\Handlers\Events\UserEventHandler@notifyNewIPAddress', 'FireflyIII\Handlers\Events\UserEventHandler@notifyNewIPAddress',
], ],
RequestedVersionCheckStatus::class => [ RequestedVersionCheckStatus::class => [
'FireflyIII\Handlers\Events\VersionCheckEventHandler@checkForUpdates', 'FireflyIII\Handlers\Events\VersionCheckEventHandler@checkForUpdates',
], ],
RequestedReportOnJournals::class => [ RequestedReportOnJournals::class => [
'FireflyIII\Handlers\Events\AutomationHandler@reportJournals', 'FireflyIII\Handlers\Events\AutomationHandler@reportJournals',
], ],
// is a User related event. // is a User related event.
RequestedNewPassword::class => [ RequestedNewPassword::class => [
'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword', 'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword',
], ],
UserTestNotificationChannel::class => [ UserTestNotificationChannel::class => [
'FireflyIII\Handlers\Events\UserEventHandler@sendTestNotification', 'FireflyIII\Handlers\Events\UserEventHandler@sendTestNotification',
], ],
// is a User related event. // is a User related event.
UserChangedEmail::class => [ UserChangedEmail::class => [
'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeConfirmMail', 'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeConfirmMail',
'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeUndoMail', 'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeUndoMail',
], ],
// admin related // admin related
OwnerTestNotificationChannel::class => [ OwnerTestNotificationChannel::class => [
'FireflyIII\Handlers\Events\AdminEventHandler@sendTestNotification', 'FireflyIII\Handlers\Events\AdminEventHandler@sendTestNotification',
], ],
NewVersionAvailable::class => [ NewVersionAvailable::class => [
'FireflyIII\Handlers\Events\AdminEventHandler@sendNewVersion', 'FireflyIII\Handlers\Events\AdminEventHandler@sendNewVersion',
], ],
InvitationCreated::class => [ InvitationCreated::class => [
'FireflyIII\Handlers\Events\AdminEventHandler@sendInvitationNotification', 'FireflyIII\Handlers\Events\AdminEventHandler@sendInvitationNotification',
'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationInvite', 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationInvite',
], ],
UnknownUserAttemptedLogin::class => [ UnknownUserAttemptedLogin::class => [
'FireflyIII\Handlers\Events\AdminEventHandler@sendLoginAttemptNotification', 'FireflyIII\Handlers\Events\AdminEventHandler@sendLoginAttemptNotification',
], ],
// is a Transaction Journal related event. // is a Transaction Journal related event.
StoredTransactionGroup::class => [ StoredTransactionGroup::class => [
'FireflyIII\Handlers\Events\StoredGroupEventHandler@runAllHandlers', 'FireflyIII\Handlers\Events\StoredGroupEventHandler@runAllHandlers',
], ],
// is a Transaction Journal related event. // is a Transaction Journal related event.
UpdatedTransactionGroup::class => [ UpdatedTransactionGroup::class => [
'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@runAllHandlers', 'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@runAllHandlers',
], ],
DestroyedTransactionGroup::class => [ DestroyedTransactionGroup::class => [
'FireflyIII\Handlers\Events\DestroyedGroupEventHandler@runAllHandlers', 'FireflyIII\Handlers\Events\DestroyedGroupEventHandler@runAllHandlers',
], ],
// API related events: // API related events:
AccessTokenCreated::class => [ AccessTokenCreated::class => [
'FireflyIII\Handlers\Events\APIEventHandler@accessTokenCreated', 'FireflyIII\Handlers\Events\APIEventHandler@accessTokenCreated',
], ],
// Webhook related event: // Webhook related event:
RequestedSendWebhookMessages::class => [ RequestedSendWebhookMessages::class => [
'FireflyIII\Handlers\Events\WebhookEventHandler@sendWebhookMessages', 'FireflyIII\Handlers\Events\WebhookEventHandler@sendWebhookMessages',
], ],
// account related events: // account related events:
StoredAccount::class => [ StoredAccount::class => [
'FireflyIII\Handlers\Events\StoredAccountEventHandler@recalculateCredit', 'FireflyIII\Handlers\Events\StoredAccountEventHandler@recalculateCredit',
], ],
UpdatedAccount::class => [ UpdatedAccount::class => [
'FireflyIII\Handlers\Events\UpdatedAccountEventHandler@recalculateCredit', 'FireflyIII\Handlers\Events\UpdatedAccountEventHandler@recalculateCredit',
], ],
// bill related events: // bill related events:
WarnUserAboutBill::class => [ WarnUserAboutBill::class => [
'FireflyIII\Handlers\Events\BillEventHandler@warnAboutBill', 'FireflyIII\Handlers\Events\BillEventHandler@warnAboutBill',
], ],
WarnUserAboutOverdueSubscription::class => [ WarnUserAboutOverdueSubscription::class => [
@@ -208,60 +208,60 @@ class EventServiceProvider extends ServiceProvider
], ],
// audit log events: // audit log events:
TriggeredAuditLog::class => [ TriggeredAuditLog::class => [
'FireflyIII\Handlers\Events\AuditEventHandler@storeAuditEvent', 'FireflyIII\Handlers\Events\AuditEventHandler@storeAuditEvent',
], ],
// piggy bank related events: // piggy bank related events:
ChangedAmount::class => [ ChangedAmount::class => [
'FireflyIII\Handlers\Events\Model\PiggyBankEventHandler@changePiggyAmount', 'FireflyIII\Handlers\Events\Model\PiggyBankEventHandler@changePiggyAmount',
], ],
ChangedName::class => [ ChangedName::class => [
'FireflyIII\Handlers\Events\Model\PiggyBankEventHandler@changedPiggyBankName', 'FireflyIII\Handlers\Events\Model\PiggyBankEventHandler@changedPiggyBankName',
], ],
// budget related events: CRUD budget limit // budget related events: CRUD budget limit
Created::class => [ Created::class => [
'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@created', 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@created',
], ],
Updated::class => [ Updated::class => [
'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@updated', 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@updated',
], ],
Deleted::class => [ Deleted::class => [
'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@deleted', 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@deleted',
], ],
// rule actions // rule actions
RuleActionFailedOnArray::class => [ RuleActionFailedOnArray::class => [
'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnArray', 'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnArray',
], ],
RuleActionFailedOnObject::class => [ RuleActionFailedOnObject::class => [
'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnObject', 'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnObject',
], ],
// security related // security related
EnabledMFA::class => [ EnabledMFA::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAEnabledMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAEnabledMail',
], ],
DisabledMFA::class => [ DisabledMFA::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFADisabledMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFADisabledMail',
], ],
MFANewBackupCodes::class => [ MFANewBackupCodes::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendNewMFABackupCodesMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendNewMFABackupCodesMail',
], ],
MFAUsedBackupCode::class => [ MFAUsedBackupCode::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendUsedBackupCodeMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendUsedBackupCodeMail',
], ],
MFABackupFewLeft::class => [ MFABackupFewLeft::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupFewLeftMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupFewLeftMail',
], ],
MFABackupNoLeft::class => [ MFABackupNoLeft::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupNoLeftMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupNoLeftMail',
], ],
MFAManyFailedAttempts::class => [ MFAManyFailedAttempts::class => [
'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAFailedAttemptsMail', 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAFailedAttemptsMail',
], ],
// preferences // preferences
UserGroupChangedPrimaryCurrency::class => [ UserGroupChangedPrimaryCurrency::class => [
'FireflyIII\Handlers\Events\PreferencesEventHandler@resetPrimaryCurrencyAmounts', 'FireflyIII\Handlers\Events\PreferencesEventHandler@resetPrimaryCurrencyAmounts',
], ],
]; ];

View File

@@ -27,7 +27,6 @@ namespace FireflyIII\Support\Cronjobs;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Events\RequestedSendWebhookMessages;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Jobs\WarnAboutBills;
use FireflyIII\Models\Configuration; use FireflyIII\Models\Configuration;
use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\Support\Facades\FireflyConfig;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;

View File

@@ -117,14 +117,14 @@ trait PeriodOverview
[$transactions, $transferredIn] = $this->filterTransfers('in', $transactions, $currentDate['start'], $currentDate['end']); [$transactions, $transferredIn] = $this->filterTransfers('in', $transactions, $currentDate['start'], $currentDate['end']);
$entries[] $entries[]
= [ = [
'title' => $title, 'title' => $title,
'route' => route('accounts.show', [$account->id, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]), 'route' => route('accounts.show', [$account->id, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
'total_transactions' => count($spent) + count($earned) + count($transferredAway) + count($transferredIn), 'total_transactions' => count($spent) + count($earned) + count($transferredAway) + count($transferredIn),
'spent' => $this->groupByCurrency($spent), 'spent' => $this->groupByCurrency($spent),
'earned' => $this->groupByCurrency($earned), 'earned' => $this->groupByCurrency($earned),
'transferred_away' => $this->groupByCurrency($transferredAway), 'transferred_away' => $this->groupByCurrency($transferredAway),
'transferred_in' => $this->groupByCurrency($transferredIn), 'transferred_in' => $this->groupByCurrency($transferredIn),
]; ];
++$loops; ++$loops;
} }
$cache->store($entries); $cache->store($entries);
@@ -590,13 +590,13 @@ trait PeriodOverview
} }
$entries[] $entries[]
= [ = [
'title' => $title, 'title' => $title,
'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]), 'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
'total_transactions' => count($spent) + count($earned) + count($transferred), 'total_transactions' => count($spent) + count($earned) + count($transferred),
'spent' => $this->groupByCurrency($spent), 'spent' => $this->groupByCurrency($spent),
'earned' => $this->groupByCurrency($earned), 'earned' => $this->groupByCurrency($earned),
'transferred' => $this->groupByCurrency($transferred), 'transferred' => $this->groupByCurrency($transferred),
]; ];
++$loops; ++$loops;
} }

12
composer.lock generated
View File

@@ -10347,16 +10347,16 @@
}, },
{ {
"name": "driftingly/rector-laravel", "name": "driftingly/rector-laravel",
"version": "2.0.5", "version": "2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/driftingly/rector-laravel.git", "url": "https://github.com/driftingly/rector-laravel.git",
"reference": "ac61de4f267c23249d175d7fc9149fd01528567d" "reference": "5be95811801fc06126dd844beaeb6a41721ba3d3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/ac61de4f267c23249d175d7fc9149fd01528567d", "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/5be95811801fc06126dd844beaeb6a41721ba3d3",
"reference": "ac61de4f267c23249d175d7fc9149fd01528567d", "reference": "5be95811801fc06126dd844beaeb6a41721ba3d3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -10376,9 +10376,9 @@
"description": "Rector upgrades rules for Laravel Framework", "description": "Rector upgrades rules for Laravel Framework",
"support": { "support": {
"issues": "https://github.com/driftingly/rector-laravel/issues", "issues": "https://github.com/driftingly/rector-laravel/issues",
"source": "https://github.com/driftingly/rector-laravel/tree/2.0.5" "source": "https://github.com/driftingly/rector-laravel/tree/2.0.6"
}, },
"time": "2025-05-14T17:30:41+00:00" "time": "2025-08-08T22:10:01+00:00"
}, },
{ {
"name": "fakerphp/faker", "name": "fakerphp/faker",

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', false), 'running_balance_column' => env('USE_RUNNING_BALANCE', false),
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-08-08', 'version' => 'develop/2025-08-09',
'build_time' => 1754679717, 'build_time' => 1754719342,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 26, 'db_version' => 26,