🤖 Auto commit for release 'develop' on 2025-12-19

This commit is contained in:
JC5
2025-12-19 16:34:41 +01:00
parent 0acd07405b
commit 476a9ac6e4
12 changed files with 202 additions and 190 deletions

View File

@@ -402,16 +402,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.92.2",
"version": "v3.92.3",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "64fab3553dce507ce247f7d1a7d65f74ef658c3f"
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/64fab3553dce507ce247f7d1a7d65f74ef658c3f",
"reference": "64fab3553dce507ce247f7d1a7d65f74ef658c3f",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
"shasum": ""
},
"require": {
@@ -494,7 +494,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.2"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.3"
},
"funding": [
{
@@ -502,7 +502,7 @@
"type": "github"
}
],
"time": "2025-12-17T00:04:16+00:00"
"time": "2025-12-18T10:45:02+00:00"
},
{
"name": "psr/container",

View File

@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use JsonException;
use stdClass;
use function Safe\json_decode;
class RemovesDatabaseDecryption extends Command

View File

@@ -84,7 +84,8 @@ class UpgradesLiabilitiesEight extends Command
$accounts = $user->accounts()
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
->whereIn('account_types.type', config('firefly.valid_liabilities'))
->get(['accounts.*']);
->get(['accounts.*'])
;
/** @var Account $account */
foreach ($accounts as $account) {
@@ -122,14 +123,16 @@ class UpgradesLiabilitiesEight extends Command
$openingJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $openingBalanceType->id)
->first(['transaction_journals.*']);
->first(['transaction_journals.*'])
;
if (null === $openingJournal) {
return false;
}
$liabilityJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $liabilityType->id)
->first(['transaction_journals.*']);
->first(['transaction_journals.*'])
;
if (null === $liabilityJournal) {
return false;
}
@@ -143,7 +146,8 @@ class UpgradesLiabilitiesEight extends Command
$liabilityJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $liabilityType->id)
->first(['transaction_journals.*']);
->first(['transaction_journals.*'])
;
if (null !== $liabilityJournal && null !== $liabilityJournal->transactionGroup) {
$group = $liabilityJournal->transactionGroup;
$service = new TransactionGroupDestroyService();
@@ -160,7 +164,8 @@ class UpgradesLiabilitiesEight extends Command
$openingJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $openingBalanceType->id)
->first(['transaction_journals.*']);
->first(['transaction_journals.*'])
;
/** @var null|Transaction $source */
$source = $openingJournal->transactions()->where('amount', '<', 0)->first();
@@ -184,7 +189,8 @@ class UpgradesLiabilitiesEight extends Command
{
$count = 0;
$journals = TransactionJournal::leftJoin('transactions', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->where('transactions.account_id', $account->id)->get(['transaction_journals.*']);
->where('transactions.account_id', $account->id)->get(['transaction_journals.*'])
;
$service = app(TransactionGroupDestroyService::class);

View File

@@ -104,7 +104,8 @@ class LoginController extends Controller
$this->username => trans('auth.failed'),
]
)
->onlyInput($this->username);
->onlyInput($this->username)
;
}
Log::debug('Login data is present.');
@@ -128,6 +129,7 @@ class LoginController extends Controller
// send a custom login event because laravel will also fire a login event if a "remember me"-cookie
// restores the event.
event(new ActuallyLoggedIn($this->guard()->user()));
return $this->sendLoginResponse($request);
}
Log::warning('Login attempt failed.');
@@ -263,9 +265,7 @@ class LoginController extends Controller
/**
* Send the response after the user was authenticated.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
* @return JsonResponse|RedirectResponse
*/
protected function sendLoginResponse(Request $request)
{
@@ -277,7 +277,7 @@ class LoginController extends Controller
}
$path = Steam::getSafeUrl(session()->pull('url.intended', route('index')), route('index'));
Log::debug(sprintf('SafeURL is %s', $path));
return $request->wantsJson() ? new JsonResponse([], 204) : redirect()->to($path);
}
}

View File

@@ -167,7 +167,6 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac
return $account;
}
/**
* Return account type or null if not found.
*/

View File

@@ -71,7 +71,6 @@ interface AccountRepositoryInterface
public function findByName(string $name, array $types): ?Account;
public function getAccountCurrency(Account $account): ?TransactionCurrency;
/**

View File

@@ -34,6 +34,7 @@ class Balance
{
/**
* Returns the accounts balances as an array, on the account ID.
*
* @deprecated
*/
public function getAccountBalances(Collection $accounts, Carbon $date): array

View File

@@ -43,6 +43,7 @@ use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException;
use ValueError;
use function Safe\parse_url;
use function Safe\preg_replace;
@@ -65,7 +66,8 @@ class Steam
->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')
->where('transaction_journals.date', $inclusive ? '<=' : '<', $date->format('Y-m-d H:i:s'))
->groupBy(['transactions.account_id', 'transaction_currencies.code'])
->get(['transactions.account_id', 'transaction_currencies.code', DB::raw('SUM(transactions.amount) as sum_of_amount')])->toArray();
->get(['transactions.account_id', 'transaction_currencies.code', DB::raw('SUM(transactions.amount) as sum_of_amount')])->toArray()
;
Log::debug('Array of sums: ', $arrayOfSums);
@@ -290,7 +292,8 @@ class Steam
return str_replace($search, '', $string);
}
#[Deprecated(message: <<<'TXT'
#[Deprecated(
message: <<<'TXT'
By default this method returns "smaller than or equal to", so be careful with END OF DAY.
If you need end of day balance, use "inclusive = false".
@@ -342,7 +345,8 @@ class Steam
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')
->where('transaction_journals.date', $inclusive ? '<=' : '<', $date->format('Y-m-d H:i:s'))
->get(['transaction_currencies.code', 'transactions.amount'])->toArray();
->get(['transaction_currencies.code', 'transactions.amount'])->toArray()
;
$others = $this->groupAndSumTransactions($array, 'code', 'amount');
Log::debug('All balances are (joined)', $others);
// if there is no request to convert, take this as "balance" and "pc_balance".
@@ -445,7 +449,8 @@ class Steam
'transactions.transaction_currency_id',
DB::raw('SUM(transactions.amount) AS sum_of_day'),
]
);
)
;
$currentBalance = $startBalance;
$converter = new ExchangeRateConverter();
@@ -672,6 +677,7 @@ class Steam
{
// Log::debug(sprintf('getSafeUrl(%s, %s)', $unknownUrl, $safeUrl));
$returnUrl = $safeUrl;
// die('in get safe url');
try {
$unknownHost = parse_url($unknownUrl, PHP_URL_HOST);

12
composer.lock generated
View File

@@ -10515,16 +10515,16 @@
},
{
"name": "driftingly/rector-laravel",
"version": "2.1.7",
"version": "2.1.8",
"source": {
"type": "git",
"url": "https://github.com/driftingly/rector-laravel.git",
"reference": "2a64c96fa363bc85e4e6d4162c6a6bb7a78fd122"
"reference": "5c5f97354e562b6742b2b7989959061bde60fa71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/2a64c96fa363bc85e4e6d4162c6a6bb7a78fd122",
"reference": "2a64c96fa363bc85e4e6d4162c6a6bb7a78fd122",
"url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/5c5f97354e562b6742b2b7989959061bde60fa71",
"reference": "5c5f97354e562b6742b2b7989959061bde60fa71",
"shasum": ""
},
"require": {
@@ -10545,9 +10545,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.1.7"
"source": "https://github.com/driftingly/rector-laravel/tree/2.1.8"
},
"time": "2025-12-10T11:30:42+00:00"
"time": "2025-12-17T15:29:24+00:00"
},
{
"name": "fakerphp/faker",

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-12-17',
'build_time' => 1765957552,
'version' => 'develop/2025-12-19',
'build_time' => 1766158365,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.

74
package-lock.json generated
View File

@@ -3294,42 +3294,42 @@
}
},
"node_modules/@vue/compiler-core": {
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.25.tgz",
"integrity": "sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==",
"version": "3.5.26",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.26.tgz",
"integrity": "sha512-vXyI5GMfuoBCnv5ucIT7jhHKl55Y477yxP6fc4eUswjP8FG3FFVFd41eNDArR+Uk3QKn2Z85NavjaxLxOC19/w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.28.5",
"@vue/shared": "3.5.25",
"entities": "^4.5.0",
"@vue/shared": "3.5.26",
"entities": "^7.0.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.2.1"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.25.tgz",
"integrity": "sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==",
"version": "3.5.26",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.26.tgz",
"integrity": "sha512-y1Tcd3eXs834QjswshSilCBnKGeQjQXB6PqFn/1nxcQw4pmG42G8lwz+FZPAZAby6gZeHSt/8LMPfZ4Rb+Bd/A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vue/compiler-core": "3.5.25",
"@vue/shared": "3.5.25"
"@vue/compiler-core": "3.5.26",
"@vue/shared": "3.5.26"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.25.tgz",
"integrity": "sha512-PUgKp2rn8fFsI++lF2sO7gwO2d9Yj57Utr5yEsDf3GNaQcowCLKL7sf+LvVFvtJDXUp/03+dC6f2+LCv5aK1ag==",
"version": "3.5.26",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.26.tgz",
"integrity": "sha512-egp69qDTSEZcf4bGOSsprUr4xI73wfrY5oRs6GSgXFTiHrWj4Y3X5Ydtip9QMqiCMCPVwLglB9GBxXtTadJ3mA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.28.5",
"@vue/compiler-core": "3.5.25",
"@vue/compiler-dom": "3.5.25",
"@vue/compiler-ssr": "3.5.25",
"@vue/shared": "3.5.25",
"@vue/compiler-core": "3.5.26",
"@vue/compiler-dom": "3.5.26",
"@vue/compiler-ssr": "3.5.26",
"@vue/shared": "3.5.26",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.21",
"postcss": "^8.5.6",
@@ -3337,14 +3337,14 @@
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.25.tgz",
"integrity": "sha512-ritPSKLBcParnsKYi+GNtbdbrIE1mtuFEJ4U1sWeuOMlIziK5GtOL85t5RhsNy4uWIXPgk+OUdpnXiTdzn8o3A==",
"version": "3.5.26",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.26.tgz",
"integrity": "sha512-lZT9/Y0nSIRUPVvapFJEVDbEXruZh2IYHMk2zTtEgJSlP5gVOqeWXH54xDKAaFS4rTnDeDBQUYDtxKyoW9FwDw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@vue/compiler-dom": "3.5.25",
"@vue/shared": "3.5.25"
"@vue/compiler-dom": "3.5.26",
"@vue/shared": "3.5.26"
}
},
"node_modules/@vue/component-compiler-utils": {
@@ -3426,9 +3426,9 @@
"license": "MIT"
},
"node_modules/@vue/shared": {
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.25.tgz",
"integrity": "sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==",
"version": "3.5.26",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.26.tgz",
"integrity": "sha512-7Z6/y3uFI5PRoKeorTOSXKcDj0MSasfNNltcslbFrPpcw6aXRUALq4IfJlaTRspiWIUOEZbrpM+iQGmCOiWe4A==",
"dev": true,
"license": "MIT"
},
@@ -4075,9 +4075,9 @@
"license": "MIT"
},
"node_modules/baseline-browser-mapping": {
"version": "2.9.8",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.8.tgz",
"integrity": "sha512-Y1fOuNDowLfgKOypdc9SPABfoWXuZHBOyCS4cD52IeZBhr4Md6CLLs6atcxVrzRmQ06E7hSlm5bHHApPKR/byA==",
"version": "2.9.11",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz",
"integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -4508,9 +4508,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001760",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz",
"integrity": "sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==",
"version": "1.0.30001761",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz",
"integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==",
"dev": true,
"funding": [
{
@@ -5787,9 +5787,9 @@
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-7.0.0.tgz",
"integrity": "sha512-FDWG5cmEYf2Z00IkYRhbFrwIwvdFKH07uV8dvNy0omp/Qb1xcyCWp2UDtcwJF4QZZvk0sLudP6/hAu42TaqVhQ==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -11740,9 +11740,9 @@
"license": "BSD-2-Clause"
},
"node_modules/webpack": {
"version": "5.104.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.104.0.tgz",
"integrity": "sha512-5DeICTX8BVgNp6afSPYXAFjskIgWGlygQH58bcozPOXgo2r/6xx39Y1+cULZ3gTxUYQP88jmwLj2anu4Xaq84g==",
"version": "5.104.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz",
"integrity": "sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==",
"dev": true,
"license": "MIT",
"dependencies": {