Compare commits

...

7 Commits

Author SHA1 Message Date
github-actions[bot]
75932a9671 Merge pull request #11229 from firefly-iii/release-1762967310
🤖 Automatically merge the PR into the develop branch.
2025-11-12 18:08:37 +01:00
JC5
3ec528812b 🤖 Auto commit for release 'develop' on 2025-11-12 2025-11-12 18:08:30 +01:00
James Cole
78de800777 Fix #11228 2025-11-12 18:02:24 +01:00
github-actions[bot]
4456b00cae Merge pull request #11223 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-11-12 05:50:16 +01:00
github-actions[bot]
a3c02d7e07 Merge pull request #11222 from firefly-iii/release-1762923004
🤖 Automatically merge the PR into the develop branch.
2025-11-12 05:50:11 +01:00
JC5
d9ff71b1a5 🤖 Auto commit for release 'v6.4.7' on 2025-11-12 2025-11-12 05:50:05 +01:00
James Cole
2e5528167c Don't do comment. 2025-11-12 05:46:21 +01:00
8 changed files with 73 additions and 66 deletions

View File

@@ -105,7 +105,7 @@ jobs:
Thank you for running the latest version of Firefly III (or the data importer)."
gh issue comment "$NUMBER" --body "$MESSAGE"
# gh issue comment "$NUMBER" --body "$MESSAGE"
echo "Triggered on fourth test"
exit 0
fi

View File

@@ -23,15 +23,16 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\Generic;
use Override;
use Illuminate\Contracts\Validation\Validator;
use FireflyIII\Api\V1\Requests\ApiRequest;
use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Models\Account;
use FireflyIII\Models\Transaction;
use FireflyIII\Rules\Account\IsValidAccountTypeList;
use FireflyIII\Rules\TransactionType\IsValidTransactionTypeList;
use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter;
use Illuminate\Contracts\Validation\Validator;
use Override;
use RuntimeException;
class ObjectTypeApiRequest extends ApiRequest
@@ -88,7 +89,11 @@ class ObjectTypeApiRequest extends ApiRequest
// no break
case Account::class:
$this->attributes->set('types', $this->mapAccountTypes($type));
$types = $this->mapAccountTypes($type);
// remove system account types because autocomplete doesn't need them.
$types = array_values(array_diff($types, [AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::RECONCILIATION->value, AccountTypeEnum::LIABILITY_CREDIT->value]));
$this->attributes->set('types', $types);
break;

View File

@@ -48,7 +48,7 @@ class IsValidAccountTypeList implements ValidationRule
$keys = array_keys($this->types);
foreach ($values as $entry) {
if (!in_array($entry, $keys, true)) {
$fail('validation.invalid_account_list')->translate();
$fail('validation.invalid_account_list')->translate(['value' => $entry]);
}
}
}

View File

@@ -33,7 +33,7 @@ trait AccountFilter
{
protected array $types
= [
'all' => [
'all' => [
AccountTypeEnum::DEFAULT->value,
AccountTypeEnum::CASH->value,
AccountTypeEnum::ASSET->value,
@@ -47,7 +47,7 @@ trait AccountFilter
AccountTypeEnum::DEBT->value,
AccountTypeEnum::MORTGAGE->value,
],
'normal' => [
'normal' => [
AccountTypeEnum::ASSET->value,
AccountTypeEnum::EXPENSE->value,
AccountTypeEnum::REVENUE->value,
@@ -55,41 +55,42 @@ trait AccountFilter
AccountTypeEnum::DEBT->value,
AccountTypeEnum::MORTGAGE->value,
],
'asset' => [AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value],
'cash' => [AccountTypeEnum::CASH->value],
'expense' => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],
'revenue' => [AccountTypeEnum::REVENUE->value],
'special' => [AccountTypeEnum::CASH->value, AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::IMPORT->value, AccountTypeEnum::RECONCILIATION->value],
'hidden' => [AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::IMPORT->value, AccountTypeEnum::RECONCILIATION->value],
'liability' => [AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CREDITCARD->value],
'liabilities' => [AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CREDITCARD->value],
AccountTypeEnum::DEFAULT->value => [AccountTypeEnum::DEFAULT->value],
AccountTypeEnum::CASH->value => [AccountTypeEnum::CASH->value],
AccountTypeEnum::ASSET->value => [AccountTypeEnum::ASSET->value],
AccountTypeEnum::EXPENSE->value => [AccountTypeEnum::EXPENSE->value],
AccountTypeEnum::REVENUE->value => [AccountTypeEnum::REVENUE->value],
AccountTypeEnum::INITIAL_BALANCE->value => [AccountTypeEnum::INITIAL_BALANCE->value],
AccountTypeEnum::BENEFICIARY->value => [AccountTypeEnum::BENEFICIARY->value],
AccountTypeEnum::IMPORT->value => [AccountTypeEnum::IMPORT->value],
AccountTypeEnum::RECONCILIATION->value => [AccountTypeEnum::RECONCILIATION->value],
AccountTypeEnum::LOAN->value => [AccountTypeEnum::LOAN->value],
AccountTypeEnum::MORTGAGE->value => [AccountTypeEnum::MORTGAGE->value],
AccountTypeEnum::DEBT->value => [AccountTypeEnum::DEBT->value],
AccountTypeEnum::CREDITCARD->value => [AccountTypeEnum::CREDITCARD->value],
'default account' => [AccountTypeEnum::DEFAULT->value],
'cash account' => [AccountTypeEnum::CASH->value],
'asset account' => [AccountTypeEnum::ASSET->value],
'expense account' => [AccountTypeEnum::EXPENSE->value],
'revenue account' => [AccountTypeEnum::REVENUE->value],
'initial balance account' => [AccountTypeEnum::INITIAL_BALANCE->value],
'reconciliation' => [AccountTypeEnum::RECONCILIATION->value],
'loan' => [AccountTypeEnum::LOAN->value],
'mortgage' => [AccountTypeEnum::MORTGAGE->value],
'debt' => [AccountTypeEnum::DEBT->value],
'credit card' => [AccountTypeEnum::CREDITCARD->value],
'credit-card' => [AccountTypeEnum::CREDITCARD->value],
'creditcard' => [AccountTypeEnum::CREDITCARD->value],
'cc' => [AccountTypeEnum::CREDITCARD->value],
'asset' => [AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value],
'cash' => [AccountTypeEnum::CASH->value],
'expense' => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],
'revenue' => [AccountTypeEnum::REVENUE->value],
'special' => [AccountTypeEnum::CASH->value, AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::IMPORT->value, AccountTypeEnum::RECONCILIATION->value],
'hidden' => [AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::IMPORT->value, AccountTypeEnum::RECONCILIATION->value],
'liability' => [AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CREDITCARD->value],
'liabilities' => [AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::CREDITCARD->value],
AccountTypeEnum::DEFAULT->value => [AccountTypeEnum::DEFAULT->value],
AccountTypeEnum::CASH->value => [AccountTypeEnum::CASH->value],
AccountTypeEnum::ASSET->value => [AccountTypeEnum::ASSET->value],
AccountTypeEnum::EXPENSE->value => [AccountTypeEnum::EXPENSE->value],
AccountTypeEnum::REVENUE->value => [AccountTypeEnum::REVENUE->value],
AccountTypeEnum::INITIAL_BALANCE->value => [AccountTypeEnum::INITIAL_BALANCE->value],
AccountTypeEnum::BENEFICIARY->value => [AccountTypeEnum::BENEFICIARY->value],
AccountTypeEnum::IMPORT->value => [AccountTypeEnum::IMPORT->value],
AccountTypeEnum::RECONCILIATION->value => [AccountTypeEnum::RECONCILIATION->value],
AccountTypeEnum::LOAN->value => [AccountTypeEnum::LOAN->value],
AccountTypeEnum::MORTGAGE->value => [AccountTypeEnum::MORTGAGE->value],
AccountTypeEnum::DEBT->value => [AccountTypeEnum::DEBT->value],
AccountTypeEnum::CREDITCARD->value => [AccountTypeEnum::CREDITCARD->value],
AccountTypeEnum::LIABILITY_CREDIT->value => [AccountTypeEnum::LIABILITY_CREDIT->value],
'default account' => [AccountTypeEnum::DEFAULT->value],
'cash account' => [AccountTypeEnum::CASH->value],
'asset account' => [AccountTypeEnum::ASSET->value],
'expense account' => [AccountTypeEnum::EXPENSE->value],
'revenue account' => [AccountTypeEnum::REVENUE->value],
'initial balance account' => [AccountTypeEnum::INITIAL_BALANCE->value],
'reconciliation' => [AccountTypeEnum::RECONCILIATION->value],
'loan' => [AccountTypeEnum::LOAN->value],
'mortgage' => [AccountTypeEnum::MORTGAGE->value],
'debt' => [AccountTypeEnum::DEBT->value],
'credit card' => [AccountTypeEnum::CREDITCARD->value],
'credit-card' => [AccountTypeEnum::CREDITCARD->value],
'creditcard' => [AccountTypeEnum::CREDITCARD->value],
'cc' => [AccountTypeEnum::CREDITCARD->value],
];
/**
@@ -104,6 +105,7 @@ trait AccountFilter
$return = array_merge($return, $this->types[$part]);
}
}
if (0 === count($return)) {
$return = $this->types['normal'];
}

38
composer.lock generated
View File

@@ -1937,16 +1937,16 @@
},
{
"name": "laravel/framework",
"version": "v12.37.0",
"version": "v12.38.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "3c3c4ad30f5b528b164a7c09aa4ad03118c4c125"
"reference": "1c30f547a3117bac99dc62a0afe767810cb112fa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/3c3c4ad30f5b528b164a7c09aa4ad03118c4c125",
"reference": "3c3c4ad30f5b528b164a7c09aa4ad03118c4c125",
"url": "https://api.github.com/repos/laravel/framework/zipball/1c30f547a3117bac99dc62a0afe767810cb112fa",
"reference": "1c30f547a3117bac99dc62a0afe767810cb112fa",
"shasum": ""
},
"require": {
@@ -2064,7 +2064,7 @@
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1",
"predis/predis": "^2.3|^3.0",
"resend/resend-php": "^0.10.0",
"resend/resend-php": "^0.10.0|^1.0",
"symfony/cache": "^7.2.0",
"symfony/http-client": "^7.2.0",
"symfony/psr-http-message-bridge": "^7.2.0",
@@ -2098,7 +2098,7 @@
"predis/predis": "Required to use the predis connector (^2.3|^3.0).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).",
"resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).",
"resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0|^1.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^7.2).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^7.2).",
"symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.2).",
@@ -2152,7 +2152,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2025-11-04T15:39:33+00:00"
"time": "2025-11-12T16:51:30+00:00"
},
{
"name": "laravel/passport",
@@ -7697,16 +7697,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v7.3.6",
"version": "v7.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "6379e490d6ecfc5c4224ff3a754b90495ecd135c"
"reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/6379e490d6ecfc5c4224ff3a754b90495ecd135c",
"reference": "6379e490d6ecfc5c4224ff3a754b90495ecd135c",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"shasum": ""
},
"require": {
@@ -7756,7 +7756,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v7.3.6"
"source": "https://github.com/symfony/http-foundation/tree/v7.3.7"
},
"funding": [
{
@@ -7776,20 +7776,20 @@
"type": "tidelift"
}
],
"time": "2025-11-06T11:05:57+00:00"
"time": "2025-11-08T16:41:12+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v7.3.6",
"version": "v7.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "f9a34dc0196677250e3609c2fac9de9e1551a262"
"reference": "10b8e9b748ea95fa4539c208e2487c435d3c87ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f9a34dc0196677250e3609c2fac9de9e1551a262",
"reference": "f9a34dc0196677250e3609c2fac9de9e1551a262",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/10b8e9b748ea95fa4539c208e2487c435d3c87ce",
"reference": "10b8e9b748ea95fa4539c208e2487c435d3c87ce",
"shasum": ""
},
"require": {
@@ -7874,7 +7874,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v7.3.6"
"source": "https://github.com/symfony/http-kernel/tree/v7.3.7"
},
"funding": [
{
@@ -7894,7 +7894,7 @@
"type": "tidelift"
}
],
"time": "2025-11-06T20:58:12+00:00"
"time": "2025-11-12T11:38:40+00:00"
},
{
"name": "symfony/mailer",

View File

@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-11-12',
'build_time' => 1762922448,
'build_time' => 1762967199,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.

6
package-lock.json generated
View File

@@ -4075,9 +4075,9 @@
"license": "MIT"
},
"node_modules/baseline-browser-mapping": {
"version": "2.8.26",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.26.tgz",
"integrity": "sha512-73lC1ugzwoaWCLJ1LvOgrR5xsMLTqSKIEoMHVtL9E/HNk0PXtTM76ZIm84856/SF7Nv8mPZxKoBsgpm0tR1u1Q==",
"version": "2.8.27",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz",
"integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==",
"dev": true,
"license": "Apache-2.0",
"bin": {

View File

@@ -24,7 +24,7 @@
declare(strict_types=1);
return [
'invalid_account_list' => 'Invalid account type list',
'invalid_account_list' => 'Invalid account type list entry ":value"',
'invalid_transaction_type_list' => 'Invalid transaction type list',
'limit_exists' => 'There is already a budget limit (amount) for this budget and currency in the given period.',
'invalid_sort_instruction' => 'The sort instruction is invalid for an object of type ":object".',