From aee5f5cdf853d42a6c0c73161c40877cf1596bfe Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Nov 2025 19:23:31 +0100 Subject: [PATCH 1/5] Go to end of month for #11191 --- app/Http/Controllers/HomeController.php | 16 ++++++++-------- app/Support/Twig/General.php | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e72c691d41..4a29660f92 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -69,7 +69,7 @@ class HomeController extends Controller $stringStart = e((string) $request->get('start')); $start = Carbon::createFromFormat('Y-m-d', $stringStart); } catch (InvalidFormatException) { - app('log')->error(sprintf('Start: could not parse date string "%s" so ignore it.', $stringStart)); + Log::error(sprintf('Start: could not parse date string "%s" so ignore it.', $stringStart)); $start = Carbon::now()->startOfMonth(); } @@ -77,7 +77,7 @@ class HomeController extends Controller $stringEnd = e((string) $request->get('end')); $end = Carbon::createFromFormat('Y-m-d', $stringEnd); } catch (InvalidFormatException) { - app('log')->error(sprintf('End could not parse date string "%s" so ignore it.', $stringEnd)); + Log::error(sprintf('End could not parse date string "%s" so ignore it.', $stringEnd)); $end = Carbon::now()->endOfMonth(); } if (null === $start) { @@ -90,12 +90,12 @@ class HomeController extends Controller $label = $request->get('label'); $isCustomRange = false; - app('log')->debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->get('label')]); + Log::debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->get('label')]); // check if the label is "everything" or "Custom range" which will betray // a possible problem with the budgets. if ($label === (string) trans('firefly.everything') || $label === (string) trans('firefly.customRange')) { $isCustomRange = true; - app('log')->debug('Range is now marked as "custom".'); + Log::debug('Range is now marked as "custom".'); } $diff = $start->diffInDays($end, true) + 1; @@ -105,11 +105,11 @@ class HomeController extends Controller } $request->session()->put('is_custom_range', $isCustomRange); - app('log')->debug(sprintf('Set is_custom_range to %s', var_export($isCustomRange, true))); + Log::debug(sprintf('Set is_custom_range to %s', var_export($isCustomRange, true))); $request->session()->put('start', $start); - app('log')->debug(sprintf('Set start to %s', $start->format('Y-m-d H:i:s'))); + Log::debug(sprintf('Set start to %s', $start->format('Y-m-d H:i:s'))); $request->session()->put('end', $end); - app('log')->debug(sprintf('Set end to %s', $end->format('Y-m-d H:i:s'))); + Log::debug(sprintf('Set end to %s', $end->format('Y-m-d H:i:s'))); return response()->json(['ok' => 'ok']); } @@ -161,7 +161,7 @@ class HomeController extends Controller $today = today(config('app.timezone')); $accounts = $accounts->sortBy('order'); // sort frontpage accounts by order - app('log')->debug('Frontpage accounts are ', $frontpageArray); + Log::debug('Frontpage accounts are ', $frontpageArray); /** @var BillRepositoryInterface $billRepository */ $billRepository = app(BillRepositoryInterface::class); diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index 80d72a9f75..ddf9857d9c 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -157,6 +157,14 @@ class General extends AbstractExtension /** @var Carbon $date */ $date = now(); + + // get the date from the current session. If it's in the future, keep `now()`. + /** @var Carbon $session */ + $session = clone session('end', today(config('app.timezone'))->endOfMonth()); + if($session->lt($date)) { + $date = $session->copy(); + $date->endOfDay(); + } Log::debug(sprintf('twig balance: Call finalAccountBalance with date/time "%s"', $date->toIso8601String())); // 2025-10-08 replace finalAccountBalance with accountsBalancesOptimized. From 444c038d9f62ad3b961e3fad19752420a012c24a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Nov 2025 23:23:09 +0100 Subject: [PATCH 2/5] Fix #11196 --- .ci/rector.php | 12 ++++++------ app/Http/Controllers/Recurring/EditController.php | 4 ++-- changelog.md | 11 ++++++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.ci/rector.php b/.ci/rector.php index 79d475e59a..eb36d34d69 100644 --- a/.ci/rector.php +++ b/.ci/rector.php @@ -57,26 +57,26 @@ return RectorConfig::configure() // uncomment to reach your current PHP version ->withPhpSets() ->withPreparedSets( + deadCode: true, + codeQuality: true, codingStyle: false, // leave false + typeDeclarations: true, + typeDeclarationDocblocks: false, privatization: false, // leave false. naming: false, // leave false instanceOf: true, earlyReturn: true, - strictBooleans: true, + // strictBooleans: true, // has a new thingie. carbon: true, rectorPreset: true, phpunitCodeQuality: true, doctrineCodeQuality: true, symfonyCodeQuality: true, - symfonyConfigs: true - + symfonyConfigs: true, ) ->withComposerBased( twig: true, doctrine: true, phpunit: true, symfony: true) - ->withTypeCoverageLevel(0) - ->withDeadCodeLevel(0) - ->withCodeQualityLevel(0) ->withImportNames(removeUnusedImports: true);// import statements instead of full classes. diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php index 45ada44542..d9b39c0e7f 100644 --- a/app/Http/Controllers/Recurring/EditController.php +++ b/app/Http/Controllers/Recurring/EditController.php @@ -154,8 +154,8 @@ class EditController extends Controller $array['repeat_until'] = substr((string) $array['repeat_until'], 0, 10); $array['transactions'][0]['tags'] = implode(',', $array['transactions'][0]['tags'] ?? []); $array['transactions'][0]['amount'] = round((float) $array['transactions'][0]['amount'], $array['transactions'][0]['currency_decimal_places']); - if (null !== $array['transactions'][0]['foreign_amount']) { - $array['transactions'][0]['foreign_amount'] = round((float) $array['transactions'][0]['foreign_amount'], $array['transactions'][0]['foreign_currency_decimal_places']); + if (null !== $array['transactions'][0]['foreign_amount'] && '' !== $array['transactions'][0]['foreign_amount']) { + $array['transactions'][0]['foreign_amount'] = round((float) $array['transactions'][0]['foreign_amount'], $array['transactions'][0]['foreign_currency_decimal_places'] ?? 2); } return view( diff --git a/changelog.md b/changelog.md index 5683dbc248..7949699439 100644 --- a/changelog.md +++ b/changelog.md @@ -3,7 +3,16 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## 6.4.5 - 2025-11-xx +## 6.4.6 - 2025-11-09 + +### Fixed + +- [Issue 11157](https://github.com/firefly-iii/firefly-iii/issues/11157) (Redacted amounts misbehave with Reports) reported by @barreeeiroo +- [Issue 11166](https://github.com/firefly-iii/firefly-iii/issues/11166) (Optional transaction information field not saved when updating a recuring transaction) reported by @Old-Veeh +- [Issue 11185](https://github.com/firefly-iii/firefly-iii/issues/11185) (Internal server error after apply rule) reported by @Citroene +- #11196 + +## 6.4.5 - 2025-11-09 ### Fixed From 37d6319fb1f4bfaa01fd834266affa774a21abaf Mon Sep 17 00:00:00 2001 From: JC5 Date: Sat, 8 Nov 2025 23:27:29 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20releas?= =?UTF-8?q?e=20'develop'=20on=202025-11-08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Support/Twig/General.php | 4 ++-- config/firefly.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index ddf9857d9c..840b7353d5 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -160,8 +160,8 @@ class General extends AbstractExtension // get the date from the current session. If it's in the future, keep `now()`. /** @var Carbon $session */ - $session = clone session('end', today(config('app.timezone'))->endOfMonth()); - if($session->lt($date)) { + $session = clone session('end', today(config('app.timezone'))->endOfMonth()); + if ($session->lt($date)) { $date = $session->copy(); $date->endOfDay(); } diff --git a/config/firefly.php b/config/firefly.php index 4aebc936e2..a13c99665d 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -78,8 +78,8 @@ return [ 'running_balance_column' => env('USE_RUNNING_BALANCE', false), // see cer.php for exchange rates feature flag. ], - 'version' => '6.4.5', - 'build_time' => 1762597345, + 'version' => 'develop/2025-11-08', + 'build_time' => 1762640730, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used. From eed5f1ca9270326e3df5098847dc6440a111d103 Mon Sep 17 00:00:00 2001 From: JC5 Date: Sat, 8 Nov 2025 23:37:54 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20releas?= =?UTF-8?q?e=20'develop'=20on=202025-11-08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 2 +- config/firefly.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 7949699439..f5b6cbce9e 100644 --- a/changelog.md +++ b/changelog.md @@ -10,7 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - [Issue 11157](https://github.com/firefly-iii/firefly-iii/issues/11157) (Redacted amounts misbehave with Reports) reported by @barreeeiroo - [Issue 11166](https://github.com/firefly-iii/firefly-iii/issues/11166) (Optional transaction information field not saved when updating a recuring transaction) reported by @Old-Veeh - [Issue 11185](https://github.com/firefly-iii/firefly-iii/issues/11185) (Internal server error after apply rule) reported by @Citroene -- #11196 +- [Issue 11196](https://github.com/firefly-iii/firefly-iii/issues/11196) (Exception when editing recurring transaction) reported by @Insprill ## 6.4.5 - 2025-11-09 diff --git a/config/firefly.php b/config/firefly.php index a13c99665d..02f2df4332 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-08', - 'build_time' => 1762640730, + 'build_time' => 1762641364, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used. From 119bc966694c443d8e18f12e353161a6f155586d Mon Sep 17 00:00:00 2001 From: JC5 Date: Sat, 8 Nov 2025 23:45:14 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20releas?= =?UTF-8?q?e=20'v6.4.6'=20on=202025-11-08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/firefly.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/firefly.php b/config/firefly.php index 02f2df4332..c84ebde36a 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -78,8 +78,8 @@ return [ 'running_balance_column' => env('USE_RUNNING_BALANCE', false), // see cer.php for exchange rates feature flag. ], - 'version' => 'develop/2025-11-08', - 'build_time' => 1762641364, + 'version' => '6.4.6', + 'build_time' => 1762641809, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used.