mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
🤖 Auto commit for release 'develop' on 2025-08-09
This commit is contained in:
@@ -252,6 +252,7 @@ class Cron extends Command
|
||||
$this->friendlyPositive(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message));
|
||||
}
|
||||
}
|
||||
|
||||
private function webhookCronJob(bool $force, ?Carbon $date): void
|
||||
{
|
||||
$webhook = new WebhookCronjob();
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Events\Model\Bill;
|
||||
|
||||
use FireflyIII\Events\Event;
|
||||
|
@@ -47,8 +47,10 @@ class BillEventHandler
|
||||
$pref = Preferences::getForUser($bill->user, $key, false);
|
||||
if (true === $pref->data) {
|
||||
Log::debug(sprintf('User %s has already been warned about overdue subscription %s.', $bill->user->id, $bill->id));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var bool $sendNotification */
|
||||
$sendNotification = Preferences::getForUser($bill->user, 'notification_bill_reminder', true)->data;
|
||||
|
||||
@@ -73,6 +75,7 @@ class BillEventHandler
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
Log::debug('User has disabled bill reminders.');
|
||||
@@ -107,6 +110,7 @@ class BillEventHandler
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
Log::debug('User has disabled bill reminders.');
|
||||
|
@@ -50,7 +50,8 @@ class WebhookEventHandler
|
||||
->get(['webhook_messages.*'])
|
||||
->filter(
|
||||
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()));
|
||||
foreach ($messages as $message) {
|
||||
if (false === $message->sent) {
|
||||
|
@@ -145,7 +145,7 @@ abstract class Controller extends BaseController
|
||||
View::share('original_route_name', Route::currentRouteName());
|
||||
|
||||
// lottery to send any remaining webhooks:
|
||||
if(7 === random_int(1, 10)) {
|
||||
if (7 === random_int(1, 10)) {
|
||||
// trigger event to send them:
|
||||
Log::debug('send event RequestedSendWebhookMessages through lottery');
|
||||
event(new RequestedSendWebhookMessages());
|
||||
|
@@ -169,6 +169,7 @@ class WarnAboutBills implements ShouldQueue
|
||||
$enrichment->setStart($start);
|
||||
$enrichment->setEnd($end);
|
||||
$single = $enrichment->enrichSingle($bill);
|
||||
|
||||
return [
|
||||
'pay_dates' => $single->meta['pay_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.
|
||||
$earliest = new Carbon($dates['pay_dates'][0]);
|
||||
$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);
|
||||
Log::debug(sprintf('Difference in days is %s', $diff));
|
||||
if ($diff < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Notifications\User;
|
||||
|
||||
use Carbon\Carbon;
|
||||
@@ -42,7 +44,7 @@ class SubscriptionOverdueReminder extends Notification
|
||||
);
|
||||
|
||||
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())
|
||||
;
|
||||
}
|
||||
@@ -97,5 +99,4 @@ class SubscriptionOverdueReminder extends Notification
|
||||
{
|
||||
return ReturnsAvailableChannels::returnChannels('user', $notifiable);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ namespace FireflyIII\Support\Cronjobs;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Events\RequestedSendWebhookMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Jobs\WarnAboutBills;
|
||||
use FireflyIII\Models\Configuration;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
12
composer.lock
generated
12
composer.lock
generated
@@ -10347,16 +10347,16 @@
|
||||
},
|
||||
{
|
||||
"name": "driftingly/rector-laravel",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/driftingly/rector-laravel.git",
|
||||
"reference": "ac61de4f267c23249d175d7fc9149fd01528567d"
|
||||
"reference": "5be95811801fc06126dd844beaeb6a41721ba3d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/ac61de4f267c23249d175d7fc9149fd01528567d",
|
||||
"reference": "ac61de4f267c23249d175d7fc9149fd01528567d",
|
||||
"url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/5be95811801fc06126dd844beaeb6a41721ba3d3",
|
||||
"reference": "5be95811801fc06126dd844beaeb6a41721ba3d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10376,9 +10376,9 @@
|
||||
"description": "Rector upgrades rules for Laravel Framework",
|
||||
"support": {
|
||||
"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",
|
||||
|
@@ -78,8 +78,8 @@ return [
|
||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-08-08',
|
||||
'build_time' => 1754679717,
|
||||
'version' => 'develop/2025-08-09',
|
||||
'build_time' => 1754719342,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 26,
|
||||
|
||||
|
Reference in New Issue
Block a user