Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2025-11-03

JC5774e02017718
diff --git a/app/Api/V1/Requests/AggregateFormRequest.php b/app/Api/V1/Requests/AggregateFormRequest.php
index 069d4fab29..8aa3cecffb 100644
--- a/app/Api/V1/Requests/AggregateFormRequest.php
+++ b/app/Api/V1/Requests/AggregateFormRequest.php
@@ -36,7 +36,7 @@ abstract class AggregateFormRequest extends ApiRequest
*/
protected array $requests = [];
- /** @return array<string|array> */
+ /** @return array<array|string> */
abstract protected function getRequests(): array;
public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 3b4eb49151..12801ca009 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -50,6 +50,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
+
use function Safe\json_encode;
use function Safe\parse_url;
@@ -66,7 +67,7 @@ class Handler extends ExceptionHandler
* @var array<int, class-string<Throwable>>
*/
protected $dontReport
- = [
+ = [
AuthenticationException::class,
LaravelValidationException::class,
NotFoundHttpException::class,
@@ -85,7 +86,7 @@ class Handler extends ExceptionHandler
public function register(): void
{
if (true === config('firefly.track_errors')) {
- $this->reportable(function (Throwable $e) {
+ $this->reportable(function (Throwable $e): void {
Integration::captureUnhandledException($e);
});
}
@@ -168,7 +169,7 @@ class Handler extends ExceptionHandler
$errorCode = 500;
$errorCode = $e instanceof MethodNotAllowedHttpException ? 405 : $errorCode;
- $isDebug = (bool)config('app.debug', false);
+ $isDebug = (bool)config('app.debug', false);
if ($isDebug) {
Log::debug(sprintf('Return JSON %s with debug.', $e::class));
@@ -233,7 +234,7 @@ class Handler extends ExceptionHandler
return;
}
- $userData = [
+ $userData = [
'id' => 0,
'email' => '[email protected]',
];
@@ -242,9 +243,9 @@ class Handler extends ExceptionHandler
$userData['email'] = auth()->user()->email;
}
- $headers = request()->headers->all();
+ $headers = request()->headers->all();
- $data = [
+ $data = [
'class' => $e::class,
'errorMessage' => $e->getMessage(),
'time' => Carbon::now()->format('r'),
@@ -262,8 +263,8 @@ class Handler extends ExceptionHandler
];
// create job that will mail.
- $ipAddress = request()->ip() ?? '0.0.0.0';
- $job = new MailError($userData, (string)config('firefly.site_owner'), $ipAddress, $data);
+ $ipAddress = request()->ip() ?? '0.0.0.0';
+ $job = new MailError($userData, (string)config('firefly.site_owner'), $ipAddress, $data);
dispatch($job);
parent::report($e);
@@ -272,9 +273,9 @@ class Handler extends ExceptionHandler
private function shouldntReportLocal(Throwable $e): bool
{
return null !== Arr::first(
- $this->dontReport,
- static fn($type) => $e instanceof $type
- );
+ $this->dontReport,
+ static fn ($type) => $e instanceof $type
+ );
}
/**
@@ -283,7 +284,7 @@ class Handler extends ExceptionHandler
* @param Request $request
*/
#[Override]
- protected function invalid($request, LaravelValidationException $exception): \Illuminate\Http\Response | JsonResponse | RedirectResponse
+ protected function invalid($request, LaravelValidationException $exception): \Illuminate\Http\Response|JsonResponse|RedirectResponse
{
// protect against open redirect when submitting invalid forms.
$previous = app('steam')->getSafePreviousUrl();
@@ -291,7 +292,8 @@ class Handler extends ExceptionHandler
return redirect($redirect ?? $previous)
->withInput(Arr::except($request->input(), $this->dontFlash))
- ->withErrors($exception->errors(), $request->input('_error_bag', $exception->errorBag));
+ ->withErrors($exception->errors(), $request->input('_error_bag', $exception->errorBag))
+ ;
}
/**
diff --git a/composer.lock b/composer.lock
index ba0c780fe9..790f7a9f12 100644
--- a/composer.lock
+++ b/composer.lock
@@ -10920,16 +10920,16 @@
},
{
"name": "larastan/larastan",
- "version": "v3.7.2",
+ "version": "v3.8.0",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
- "reference": "a761859a7487bd7d0cb8b662a7538a234d5bb5ae"
+ "reference": "d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/larastan/larastan/zipball/a761859a7487bd7d0cb8b662a7538a234d5bb5ae",
- "reference": "a761859a7487bd7d0cb8b662a7538a234d5bb5ae",
+ "url": "https://api.github.com/repos/larastan/larastan/zipball/d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e",
+ "reference": "d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e",
"shasum": ""
},
"require": {
@@ -10943,7 +10943,7 @@
"illuminate/pipeline": "^11.44.2 || ^12.4.1",
"illuminate/support": "^11.44.2 || ^12.4.1",
"php": "^8.2",
- "phpstan/phpstan": "^2.1.28"
+ "phpstan/phpstan": "^2.1.29"
},
"require-dev": {
"doctrine/coding-standard": "^13",
@@ -10956,7 +10956,8 @@
"phpunit/phpunit": "^10.5.35 || ^11.5.15"
},
"suggest": {
- "orchestra/testbench": "Using Larastan for analysing a package needs Testbench"
+ "orchestra/testbench": "Using Larastan for analysing a package needs Testbench",
+ "phpmyadmin/sql-parser": "Install to enable Larastan's optional phpMyAdmin-based SQL parser automatically"
},
"type": "phpstan-extension",
"extra": {
@@ -10997,7 +10998,7 @@
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
- "source": "https://github.com/larastan/larastan/tree/v3.7.2"
+ "source": "https://github.com/larastan/larastan/tree/v3.8.0"
},
"funding": [
{
@@ -11005,7 +11006,7 @@
"type": "github"
}
],
- "time": "2025-09-19T09:03:05+00:00"
+ "time": "2025-10-27T23:09:14+00:00"
},
{
"name": "laravel-json-api/testing",
diff --git a/config/firefly.php b/config/firefly.php
index 9b753b555d..0df50fce02 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-11-03',
- 'build_time' => 1762140500,
+ 'build_time' => 1762197101,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.
@@ -411,7 +411,7 @@ return [
],
- 'rule-actions' => [
+ 'rule-actions' => [
'set_category' => SetCategory::class,
'clear_category' => ClearCategory::class,
'set_budget' => SetBudget::class,
@@ -445,7 +445,7 @@ return [
// 'set_foreign_amount' => SetForeignAmount::class,
// 'set_foreign_currency' => SetForeignCurrency::class,
],
- 'context-rule-actions' => [
+ 'context-rule-actions' => [
'set_category',
'set_budget',
'add_tag',
@@ -464,13 +464,13 @@ return [
'convert_transfer',
],
- 'test-triggers' => [
+ 'test-triggers' => [
'limit' => 10,
'range' => 200,
],
// expected source types for each transaction type, in order of preference.
- 'expected_source_types' => [
+ 'expected_source_types' => [
'source' => [
TransactionTypeEnum::WITHDRAWAL->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
TransactionTypeEnum::DEPOSIT->value => [AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::REVENUE->value, AccountTypeEnum::CASH->value],
@@ -515,7 +515,7 @@ return [
TransactionTypeEnum::LIABILITY_CREDIT->value => [AccountTypeEnum::LIABILITY_CREDIT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
],
],
- 'allowed_opposing_types' => [
+ 'allowed_opposing_types' => [
'source' => [
AccountTypeEnum::ASSET->value => [
AccountTypeEnum::ASSET->value,
@@ -605,7 +605,7 @@ return [
],
],
// depending on the account type, return the allowed transaction types:
- 'allowed_transaction_types' => [
+ 'allowed_transaction_types' => [
'source' => [
AccountTypeEnum::ASSET->value => [
TransactionTypeEnum::WITHDRAWAL->value,
@@ -674,7 +674,7 @@ return [
],
// having the source + dest will tell you the transaction type.
- 'account_to_transaction' => [
+ 'account_to_transaction' => [
AccountTypeEnum::ASSET->value => [
AccountTypeEnum::ASSET->value => TransactionTypeEnum::TRANSFER->value,
AccountTypeEnum::CASH->value => TransactionTypeEnum::WITHDRAWAL->value,
@@ -739,7 +739,7 @@ return [
],
// allowed source -> destination accounts.
- 'source_dests' => [
+ 'source_dests' => [
TransactionTypeEnum::WITHDRAWAL->value => [
AccountTypeEnum::ASSET->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CASH->value],
AccountTypeEnum::LOAN->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::CASH->value],
@@ -778,7 +778,7 @@ return [
],
],
// if you add fields to this array, don't forget to update the export routine (ExportDataGenerator).
- 'journal_meta_fields' => [
+ 'journal_meta_fields' => [
// sepa
'sepa_cc',
'sepa_ct_op',
@@ -812,47 +812,47 @@ return [
'recurrence_count',
'recurrence_date',
],
- 'webhooks' => [
+ 'webhooks' => [
'max_attempts' => env('WEBHOOK_MAX_ATTEMPTS', 3),
],
- 'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value],
- 'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
- 'dynamic_creation_allowed' => [
+ 'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value],
+ 'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
+ 'dynamic_creation_allowed' => [
AccountTypeEnum::EXPENSE->value,
AccountTypeEnum::REVENUE->value,
AccountTypeEnum::INITIAL_BALANCE->value,
AccountTypeEnum::RECONCILIATION->value,
AccountTypeEnum::LIABILITY_CREDIT->value,
],
- 'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
- 'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
- 'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'],
+ 'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
+ 'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'],
+ 'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'],
// dynamic date ranges are as follows:
- 'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'],
+ 'dynamic_date_ranges' => ['last7', 'last30', 'last90', 'last365', 'MTD', 'QTD', 'YTD'],
- 'allowed_sort_parameters' => [
+ 'allowed_sort_parameters' => [
'Account' => ['id', 'order', 'name', 'iban', 'active', 'account_type_id',
- 'current_balance',
- 'pc_current_balance',
- 'opening_balance',
- 'pc_opening_balance',
- 'virtual_balance',
- 'pc_virtual_balance',
- 'debt_amount',
- 'pc_debt_amount',
- 'balance_difference',
- 'pc_balance_difference',
+ 'current_balance',
+ 'pc_current_balance',
+ 'opening_balance',
+ 'pc_opening_balance',
+ 'virtual_balance',
+ 'pc_virtual_balance',
+ 'debt_amount',
+ 'pc_debt_amount',
+ 'balance_difference',
+ 'pc_balance_difference',
],
],
- 'allowed_db_sort_parameters' => [
+ 'allowed_db_sort_parameters' => [
'Account' => ['id', 'order', 'name', 'iban', 'active', 'account_type_id'],
],
// preselected account lists possibilities:
- 'preselected_accounts' => ['all', 'assets', 'liabilities'],
+ 'preselected_accounts' => ['all', 'assets', 'liabilities'],
// allowed to store a piggy bank in:
- 'piggy_bank_account_types' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
+ 'piggy_bank_account_types' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
];
diff --git a/config/sentry.php b/config/sentry.php
index b4256e1524..30b362d7d6 100644
--- a/config/sentry.php
+++ b/config/sentry.php
@@ -1,5 +1,9 @@
<?php
+declare(strict_types=1);
+
+use Illuminate\Auth\AuthenticationException;
+
/**
* Sentry Laravel SDK configuration file.
*
@@ -13,13 +17,13 @@ return [
'environment' => env('SENTRY_ENVIRONMENT'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#sample_rate
- 'sample_rate' => env('SENTRY_SAMPLE_RATE') === null ? 1.0 : (float)env('SENTRY_SAMPLE_RATE'),
+ 'sample_rate' => null === env('SENTRY_SAMPLE_RATE') ? 1.0 : (float)env('SENTRY_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces_sample_rate
- 'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'),
+ 'traces_sample_rate' => null === env('SENTRY_TRACES_SAMPLE_RATE') ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#profiles-sample-rate
- 'profiles_sample_rate' => env('SENTRY_PROFILES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_PROFILES_SAMPLE_RATE'),
+ 'profiles_sample_rate' => null === env('SENTRY_PROFILES_SAMPLE_RATE') ? null : (float)env('SENTRY_PROFILES_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#enable_logs
'enable_logs' => env('SENTRY_ENABLE_LOGS', false),
@@ -32,7 +36,7 @@ return [
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_exceptions
'ignore_exceptions' => [
- \Illuminate\Auth\AuthenticationException::class,
+ AuthenticationException::class,
],
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_transactions