🤖 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

@@ -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

@@ -47,8 +47,10 @@ class BillEventHandler
$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

@@ -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

@@ -169,6 +169,7 @@ class WarnAboutBills implements ShouldQueue
$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'] ?? [],
@@ -184,12 +185,13 @@ class WarnAboutBills implements ShouldQueue
// 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,7 +44,7 @@ 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())
; ;
} }
@@ -97,5 +99,4 @@ class SubscriptionOverdueReminder extends Notification
{ {
return ReturnsAvailableChannels::returnChannels('user', $notifiable); return ReturnsAvailableChannels::returnChannels('user', $notifiable);
} }
} }

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;

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,