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

This commit is contained in:
JC5
2025-11-03 20:13:41 +01:00
parent 47f938c71b
commit 774e020177
5 changed files with 65 additions and 58 deletions

View File

@@ -36,7 +36,7 @@ abstract class AggregateFormRequest extends ApiRequest
*/ */
protected array $requests = []; protected array $requests = [];
/** @return array<string|array> */ /** @return array<array|string> */
abstract protected function getRequests(): array; abstract protected function getRequests(): array;
public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void

View File

@@ -50,6 +50,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable; use Throwable;
use function Safe\json_encode; use function Safe\json_encode;
use function Safe\parse_url; use function Safe\parse_url;
@@ -66,7 +67,7 @@ class Handler extends ExceptionHandler
* @var array<int, class-string<Throwable>> * @var array<int, class-string<Throwable>>
*/ */
protected $dontReport protected $dontReport
= [ = [
AuthenticationException::class, AuthenticationException::class,
LaravelValidationException::class, LaravelValidationException::class,
NotFoundHttpException::class, NotFoundHttpException::class,
@@ -85,7 +86,7 @@ class Handler extends ExceptionHandler
public function register(): void public function register(): void
{ {
if (true === config('firefly.track_errors')) { if (true === config('firefly.track_errors')) {
$this->reportable(function (Throwable $e) { $this->reportable(function (Throwable $e): void {
Integration::captureUnhandledException($e); Integration::captureUnhandledException($e);
}); });
} }
@@ -168,7 +169,7 @@ class Handler extends ExceptionHandler
$errorCode = 500; $errorCode = 500;
$errorCode = $e instanceof MethodNotAllowedHttpException ? 405 : $errorCode; $errorCode = $e instanceof MethodNotAllowedHttpException ? 405 : $errorCode;
$isDebug = (bool)config('app.debug', false); $isDebug = (bool)config('app.debug', false);
if ($isDebug) { if ($isDebug) {
Log::debug(sprintf('Return JSON %s with debug.', $e::class)); Log::debug(sprintf('Return JSON %s with debug.', $e::class));
@@ -233,7 +234,7 @@ class Handler extends ExceptionHandler
return; return;
} }
$userData = [ $userData = [
'id' => 0, 'id' => 0,
'email' => 'unknown@example.com', 'email' => 'unknown@example.com',
]; ];
@@ -242,9 +243,9 @@ class Handler extends ExceptionHandler
$userData['email'] = auth()->user()->email; $userData['email'] = auth()->user()->email;
} }
$headers = request()->headers->all(); $headers = request()->headers->all();
$data = [ $data = [
'class' => $e::class, 'class' => $e::class,
'errorMessage' => $e->getMessage(), 'errorMessage' => $e->getMessage(),
'time' => Carbon::now()->format('r'), 'time' => Carbon::now()->format('r'),
@@ -262,8 +263,8 @@ class Handler extends ExceptionHandler
]; ];
// create job that will mail. // create job that will mail.
$ipAddress = request()->ip() ?? '0.0.0.0'; $ipAddress = request()->ip() ?? '0.0.0.0';
$job = new MailError($userData, (string)config('firefly.site_owner'), $ipAddress, $data); $job = new MailError($userData, (string)config('firefly.site_owner'), $ipAddress, $data);
dispatch($job); dispatch($job);
parent::report($e); parent::report($e);
@@ -272,9 +273,9 @@ class Handler extends ExceptionHandler
private function shouldntReportLocal(Throwable $e): bool private function shouldntReportLocal(Throwable $e): bool
{ {
return null !== Arr::first( return null !== Arr::first(
$this->dontReport, $this->dontReport,
static fn($type) => $e instanceof $type static fn ($type) => $e instanceof $type
); );
} }
/** /**
@@ -283,7 +284,7 @@ class Handler extends ExceptionHandler
* @param Request $request * @param Request $request
*/ */
#[Override] #[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. // protect against open redirect when submitting invalid forms.
$previous = app('steam')->getSafePreviousUrl(); $previous = app('steam')->getSafePreviousUrl();
@@ -291,7 +292,8 @@ class Handler extends ExceptionHandler
return redirect($redirect ?? $previous) return redirect($redirect ?? $previous)
->withInput(Arr::except($request->input(), $this->dontFlash)) ->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))
;
} }
/** /**

17
composer.lock generated
View File

@@ -10920,16 +10920,16 @@
}, },
{ {
"name": "larastan/larastan", "name": "larastan/larastan",
"version": "v3.7.2", "version": "v3.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/larastan/larastan.git", "url": "https://github.com/larastan/larastan.git",
"reference": "a761859a7487bd7d0cb8b662a7538a234d5bb5ae" "reference": "d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/a761859a7487bd7d0cb8b662a7538a234d5bb5ae", "url": "https://api.github.com/repos/larastan/larastan/zipball/d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e",
"reference": "a761859a7487bd7d0cb8b662a7538a234d5bb5ae", "reference": "d13ef96d652d1b2a8f34f1760ba6bf5b9c98112e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -10943,7 +10943,7 @@
"illuminate/pipeline": "^11.44.2 || ^12.4.1", "illuminate/pipeline": "^11.44.2 || ^12.4.1",
"illuminate/support": "^11.44.2 || ^12.4.1", "illuminate/support": "^11.44.2 || ^12.4.1",
"php": "^8.2", "php": "^8.2",
"phpstan/phpstan": "^2.1.28" "phpstan/phpstan": "^2.1.29"
}, },
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^13", "doctrine/coding-standard": "^13",
@@ -10956,7 +10956,8 @@
"phpunit/phpunit": "^10.5.35 || ^11.5.15" "phpunit/phpunit": "^10.5.35 || ^11.5.15"
}, },
"suggest": { "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", "type": "phpstan-extension",
"extra": { "extra": {
@@ -10997,7 +10998,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/larastan/larastan/issues", "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": [ "funding": [
{ {
@@ -11005,7 +11006,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-09-19T09:03:05+00:00" "time": "2025-10-27T23:09:14+00:00"
}, },
{ {
"name": "laravel-json-api/testing", "name": "laravel-json-api/testing",

View File

@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-11-03', 'version' => 'develop/2025-11-03',
'build_time' => 1762140500, 'build_time' => 1762197101,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // 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, 'set_category' => SetCategory::class,
'clear_category' => ClearCategory::class, 'clear_category' => ClearCategory::class,
'set_budget' => SetBudget::class, 'set_budget' => SetBudget::class,
@@ -445,7 +445,7 @@ return [
// 'set_foreign_amount' => SetForeignAmount::class, // 'set_foreign_amount' => SetForeignAmount::class,
// 'set_foreign_currency' => SetForeignCurrency::class, // 'set_foreign_currency' => SetForeignCurrency::class,
], ],
'context-rule-actions' => [ 'context-rule-actions' => [
'set_category', 'set_category',
'set_budget', 'set_budget',
'add_tag', 'add_tag',
@@ -464,13 +464,13 @@ return [
'convert_transfer', 'convert_transfer',
], ],
'test-triggers' => [ 'test-triggers' => [
'limit' => 10, 'limit' => 10,
'range' => 200, 'range' => 200,
], ],
// expected source types for each transaction type, in order of preference. // expected source types for each transaction type, in order of preference.
'expected_source_types' => [ 'expected_source_types' => [
'source' => [ 'source' => [
TransactionTypeEnum::WITHDRAWAL->value => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value], 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], 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], TransactionTypeEnum::LIABILITY_CREDIT->value => [AccountTypeEnum::LIABILITY_CREDIT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
], ],
], ],
'allowed_opposing_types' => [ 'allowed_opposing_types' => [
'source' => [ 'source' => [
AccountTypeEnum::ASSET->value => [ AccountTypeEnum::ASSET->value => [
AccountTypeEnum::ASSET->value, AccountTypeEnum::ASSET->value,
@@ -605,7 +605,7 @@ return [
], ],
], ],
// depending on the account type, return the allowed transaction types: // depending on the account type, return the allowed transaction types:
'allowed_transaction_types' => [ 'allowed_transaction_types' => [
'source' => [ 'source' => [
AccountTypeEnum::ASSET->value => [ AccountTypeEnum::ASSET->value => [
TransactionTypeEnum::WITHDRAWAL->value, TransactionTypeEnum::WITHDRAWAL->value,
@@ -674,7 +674,7 @@ return [
], ],
// having the source + dest will tell you the transaction type. // having the source + dest will tell you the transaction type.
'account_to_transaction' => [ 'account_to_transaction' => [
AccountTypeEnum::ASSET->value => [ AccountTypeEnum::ASSET->value => [
AccountTypeEnum::ASSET->value => TransactionTypeEnum::TRANSFER->value, AccountTypeEnum::ASSET->value => TransactionTypeEnum::TRANSFER->value,
AccountTypeEnum::CASH->value => TransactionTypeEnum::WITHDRAWAL->value, AccountTypeEnum::CASH->value => TransactionTypeEnum::WITHDRAWAL->value,
@@ -739,7 +739,7 @@ return [
], ],
// allowed source -> destination accounts. // allowed source -> destination accounts.
'source_dests' => [ 'source_dests' => [
TransactionTypeEnum::WITHDRAWAL->value => [ TransactionTypeEnum::WITHDRAWAL->value => [
AccountTypeEnum::ASSET->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CASH->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], 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). // if you add fields to this array, don't forget to update the export routine (ExportDataGenerator).
'journal_meta_fields' => [ 'journal_meta_fields' => [
// sepa // sepa
'sepa_cc', 'sepa_cc',
'sepa_ct_op', 'sepa_ct_op',
@@ -812,47 +812,47 @@ return [
'recurrence_count', 'recurrence_count',
'recurrence_date', 'recurrence_date',
], ],
'webhooks' => [ 'webhooks' => [
'max_attempts' => env('WEBHOOK_MAX_ATTEMPTS', 3), 'max_attempts' => env('WEBHOOK_MAX_ATTEMPTS', 3),
], ],
'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value], 'can_have_virtual_amounts' => [AccountTypeEnum::ASSET->value],
'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value], 'can_have_opening_balance' => [AccountTypeEnum::ASSET->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value],
'dynamic_creation_allowed' => [ 'dynamic_creation_allowed' => [
AccountTypeEnum::EXPENSE->value, AccountTypeEnum::EXPENSE->value,
AccountTypeEnum::REVENUE->value, AccountTypeEnum::REVENUE->value,
AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::INITIAL_BALANCE->value,
AccountTypeEnum::RECONCILIATION->value, AccountTypeEnum::RECONCILIATION->value,
AccountTypeEnum::LIABILITY_CREDIT->value, AccountTypeEnum::LIABILITY_CREDIT->value,
], ],
'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], '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_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_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'],
// dynamic date ranges are as follows: // 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', 'Account' => ['id', 'order', 'name', 'iban', 'active', 'account_type_id',
'current_balance', 'current_balance',
'pc_current_balance', 'pc_current_balance',
'opening_balance', 'opening_balance',
'pc_opening_balance', 'pc_opening_balance',
'virtual_balance', 'virtual_balance',
'pc_virtual_balance', 'pc_virtual_balance',
'debt_amount', 'debt_amount',
'pc_debt_amount', 'pc_debt_amount',
'balance_difference', 'balance_difference',
'pc_balance_difference', 'pc_balance_difference',
], ],
], ],
'allowed_db_sort_parameters' => [ 'allowed_db_sort_parameters' => [
'Account' => ['id', 'order', 'name', 'iban', 'active', 'account_type_id'], 'Account' => ['id', 'order', 'name', 'iban', 'active', 'account_type_id'],
], ],
// preselected account lists possibilities: // preselected account lists possibilities:
'preselected_accounts' => ['all', 'assets', 'liabilities'], 'preselected_accounts' => ['all', 'assets', 'liabilities'],
// allowed to store a piggy bank in: // 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],
]; ];

View File

@@ -1,5 +1,9 @@
<?php <?php
declare(strict_types=1);
use Illuminate\Auth\AuthenticationException;
/** /**
* Sentry Laravel SDK configuration file. * Sentry Laravel SDK configuration file.
* *
@@ -13,13 +17,13 @@ return [
'environment' => env('SENTRY_ENVIRONMENT'), 'environment' => env('SENTRY_ENVIRONMENT'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#sample_rate // @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 // @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 // @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 // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#enable_logs
'enable_logs' => env('SENTRY_ENABLE_LOGS', false), '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 // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_exceptions
'ignore_exceptions' => [ 'ignore_exceptions' => [
\Illuminate\Auth\AuthenticationException::class, AuthenticationException::class,
], ],
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_transactions // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_transactions