Compare commits

..

26 Commits

Author SHA1 Message Date
github-actions[bot]
80823cdfe3 Merge pull request #11784 from firefly-iii/release-1771741207
🤖 Automatically merge the PR into the develop branch.
2026-02-22 07:20:14 +01:00
JC5
defaef171e 🤖 Auto commit for release 'develop' on 2026-02-22 2026-02-22 07:20:07 +01:00
James Cole
81f6f22efb Introduce undocumented count endpoint. 2026-02-22 07:05:30 +01:00
github-actions[bot]
4ad2508675 Merge pull request #11781 from firefly-iii/release-1771701858
🤖 Automatically merge the PR into the develop branch.
2026-02-21 20:24:25 +01:00
JC5
35f997be45 🤖 Auto commit for release 'develop' on 2026-02-21 2026-02-21 20:24:18 +01:00
James Cole
ad3fec1458 Clean up templates. 2026-02-21 20:18:04 +01:00
github-actions[bot]
25eab80ec3 Merge pull request #11780 from firefly-iii/release-1771686867
🤖 Automatically merge the PR into the develop branch.
2026-02-21 16:14:35 +01:00
JC5
c27e9873b2 🤖 Auto commit for release 'develop' on 2026-02-21 2026-02-21 16:14:27 +01:00
James Cole
84f4f63104 Update changelog. 2026-02-21 16:08:55 +01:00
James Cole
02d37998f9 Merge pull request #11776 from dakennguyen/convert-to-primary-currency-for-charts
Convert to primary currency for charts
2026-02-21 15:44:56 +01:00
James Cole
39c72a60e1 Fix https://github.com/firefly-iii/firefly-iii/issues/11778 2026-02-21 15:42:52 +01:00
Khoa Nguyen
1980f73694 Convert to primary currency for report chart 2026-02-21 13:14:57 +01:00
Khoa Nguyen
d135186149 Convert to primary currency for category chart 2026-02-21 13:14:49 +01:00
github-actions[bot]
3e36287374 Merge pull request #11774 from firefly-iii/release-1771667913
🤖 Automatically merge the PR into the develop branch.
2026-02-21 10:58:39 +01:00
JC5
37c4db2ce9 🤖 Auto commit for release 'develop' on 2026-02-21 2026-02-21 10:58:33 +01:00
James Cole
8e6ff3ceaf Fix small issues reported over mail and from the demo site. 2026-02-21 10:53:14 +01:00
James Cole
6e0e32dc6c You can always grab the latest develop release. 2026-02-21 08:05:01 +01:00
github-actions[bot]
b0e21dd553 Merge pull request #11773 from firefly-iii/release-1771657248
🤖 Automatically merge the PR into the develop branch.
2026-02-21 08:00:55 +01:00
JC5
88291c5f63 🤖 Auto commit for release 'develop' on 2026-02-21 2026-02-21 08:00:48 +01:00
James Cole
a87e10f734 Add a week's delay. 2026-02-21 07:54:23 +01:00
github-actions[bot]
75f42d57f1 Merge pull request #11772 from firefly-iii/release-1771653268
🤖 Automatically merge the PR into the develop branch.
2026-02-21 06:54:36 +01:00
JC5
3f60442281 🤖 Auto commit for release 'develop' on 2026-02-21 2026-02-21 06:54:28 +01:00
James Cole
dd14bb1664 Add 10m slack 2026-02-21 06:48:34 +01:00
James Cole
403a2ce2cd Remove weird repeated line from Mago. 2026-02-21 06:47:26 +01:00
James Cole
e5366dbf6c Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
# Conflicts:
#	app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
2026-02-21 06:44:11 +01:00
James Cole
091f264f3e Remove mago analyse, fix update check. 2026-02-21 06:40:51 +01:00
27 changed files with 265 additions and 810 deletions

View File

@@ -4,9 +4,9 @@ body:
- type: checkboxes
attributes:
label: Support guidelines
description: Please read the support guidelines before proceeding.
description: Thank you for reading the support guidelines before proceeding.
options:
- label: I've read the <!-- MZ2udTpin6FL --> [support guidelines](https://github.com/firefly-iii/firefly-iii/blob/main/.github/support.md)
- label: I'm smart and I read the <!-- MZ2udTpin6FL --> [support guidelines](https://github.com/firefly-iii/firefly-iii/blob/main/.github/support.md)
required: true
- type: checkboxes
@@ -29,7 +29,7 @@ body:
attributes:
label: Debug information
description: Please provide the table from the /debug page. Do not add backticks or quotes.
placeholder: The output from the /debug page
placeholder: The output from the /debug page or "N/A"
validations:
required: true

View File

@@ -1,20 +1,22 @@
<!--
Thank you for submitting new code to Firefly III, or any of the related projects. Please read the following rules carefully.
- Please do not submit solutions for problems that are not already reported in an issue.
- Unfortunately, Firefly III can't be your learning experience. If you're new to all of this, please open an issue first.
- Please do not open PRs to "discuss" possible solutions or to "get feedback" on your code. I simply don't have time for that.
- Pull requests for the MAIN branch will be closed.
- DO NOT include translated strings in your PR.
- PRs (or parts thereof) that only fix issues inside code comments will not be accepted.
Please TALK TO ME FIRST before you open a PR.
If it feels necessary to open an issue first, please do so, before you open a PR.
1. If you fix a problem that has no ticket, talk to me FIRST.
2. If you introduce new financial solutions or concepts, talk to me FIRST.
3. If your PR is more than 25 lines, talk to me FIRST.
4. If you used AI to write your PR, talk to me FIRST.
5. If you fix spelling or code comments, talk to me FIRST.
Wanna talk to me? Open a GitHub Issue, Discussion, or send me an email: james@firefly-iii.org
See also: https://docs.firefly-iii.org/explanation/support/#contributing-code
-->
@JC5
This PR fixes issue # (if relevant).
This PR fixes issue # <!-- mandatory field! -->.
Changes in this pull request:

View File

@@ -177,7 +177,7 @@ jobs:
rm -rf vendor composer.lock
composer update --no-scripts --no-plugins -q
mago format || true
mago analyze --reporting-format=github || true
# mago analyze --reporting-format=github || true
sudo chown -R runner:docker resources/lang
.ci/phpcs.sh || true
- name: Calculate variables

View File

@@ -4,6 +4,7 @@ Over time, many people have contributed to Firefly III. Their efforts are not al
Please find below all the people who contributed to the Firefly III code. Their names are mentioned in the year of their first contribution.
## 2026
- Khoa Nguyen
- Nick Huang
- mateuszkulapl
- Gianluca Martino

View File

@@ -25,11 +25,15 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Search;
use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Search\CountRequest;
use FireflyIII\Api\V1\Requests\Search\TransactionSearchRequest;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use FireflyIII\Support\JsonApi\Enrichments\TransactionGroupEnrichment;
use FireflyIII\Support\Search\SearchInterface;
use FireflyIII\Transformers\TransactionGroupTransformer;
use FireflyIII\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection;
@@ -38,6 +42,51 @@ use League\Fractal\Resource\Collection;
*/
class TransactionController extends Controller
{
private JournalRepositoryInterface $repository;
public function __construct()
{
parent::__construct();
$this->middleware(function ($request, $next) {
/** @var User $admin */
$admin = auth()->user();
$this->repository = app(JournalRepositoryInterface::class);
$this->repository->setUser($admin);
return $next($request);
});
}
public function count(CountRequest $request, SearchInterface $searcher): JsonResponse
{
$count = 0;
$includeDeleted = $request->attributes->get('include_deleted', false);
$externalId = (string) $request->attributes->get('external_identifier');
$internalRef = (string) $request->attributes->get('internal_reference');
$notes = (string) $request->attributes->get('notes');
$description = (string) $request->attributes->get('description');
Log::debug(sprintf('Include deleted? %s', var_export($includeDeleted, true)));
if ('' !== $externalId) {
$count += $this->repository->countByMeta('external_identifier', $externalId, $includeDeleted);
Log::debug(sprintf('Search for transactions with external_identifier "%s", count is now %d', $externalId, $count));
}
if ('' !== $internalRef) {
$count += $this->repository->countByMeta('internal_reference', $internalRef, $includeDeleted);
Log::debug(sprintf('Search for transactions with internal_reference "%s", count is now %d', $internalRef, $count));
}
if ('' !== $notes) {
$count += $this->repository->countByNotes($notes, $includeDeleted);
Log::debug(sprintf('Search for transactions with notes LIKE "%s", count is now %d', $notes, $count));
}
if ('' !== $description) {
$count += $this->repository->countByDescription($description, $includeDeleted);
Log::debug(sprintf('Search for transactions with description "%s", count is now %d', $description, $count));
}
return response()->json(['count' => $count]);
}
/**
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchTransactions

View File

@@ -92,7 +92,7 @@ class UpdateRequest extends FormRequest
'description' => 'min:1|max:32768|nullable',
'rule_group_id' => 'belongsToUser:rule_groups',
'rule_group_title' => 'nullable|min:1|max:255|belongsToUser:rule_groups,title',
'trigger' => 'in:store-journal,update-journal.manual-activation',
'trigger' => 'in:store-journal,update-journal,manual-activation',
'triggers.*.type' => 'required|in:'.implode(',', $validTriggers),
'triggers.*.value' => 'required_if:actions.*.type,'.$contextTriggers.'|min:1|ruleTriggerValue|max:1024',
'triggers.*.stop_processing' => [new IsBoolean()],

View File

@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
/*
* SearchRequest.php
* Copyright (c) 2026 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Api\V1\Requests\Search;
use FireflyIII\Api\V1\Requests\AggregateFormRequest;
use FireflyIII\Rules\IsBoolean;
use Illuminate\Contracts\Validation\Validator;
use Override;
class CountRequest extends AggregateFormRequest
{
public function rules(): array
{
return [
'notes' => 'string|min:1|max:255',
'external_identifier' => 'string|min:1|max:255',
'description' => 'string|min:1|max:255',
'internal_reference' => 'string|min:1|max:255',
'include_deleted' => new IsBoolean(),
];
}
public function withValidator(Validator $validator): void
{
$validator->after(function (Validator $validator): void {
if ($validator->failed()) {
return;
}
$this->attributes->set('include_deleted', $this->convertBoolean($this->input('include_deleted', 'false')));
$this->attributes->set('notes', $this->convertString('notes'));
$this->attributes->set('external_identifier', $this->convertString('external_identifier'));
$this->attributes->set('description', $this->convertString('description'));
$this->attributes->set('internal_reference', $this->convertString('internal_reference'));
});
}
#[Override]
protected function getRequests(): array
{
return [];
}
}

View File

@@ -103,10 +103,10 @@ class CategoryController extends Controller
*/
public function frontPage(): JsonResponse
{
$start = session('start', today(config('app.timezone'))->startOfMonth());
$end = session('end', today(config('app.timezone'))->endOfMonth());
$start = session('start', today(config('app.timezone'))->startOfMonth());
$end = session('end', today(config('app.timezone'))->endOfMonth());
// chart properties for cache:
$cache = new CacheProperties();
$cache = new CacheProperties();
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($this->convertToPrimary);
@@ -115,9 +115,11 @@ class CategoryController extends Controller
return response()->json($cache->get());
}
$frontpageGenerator = new FrontpageChartGenerator($start, $end);
$chartData = $frontpageGenerator->generate();
$data = $this->generator->multiSet($chartData);
$frontpageGenerator = new FrontpageChartGenerator($start, $end);
$frontpageGenerator->convertToPrimary = $this->convertToPrimary;
$chartData = $frontpageGenerator->generate();
$data = $this->generator->multiSet($chartData);
$cache->store($data);
return response()->json($data);

View File

@@ -147,6 +147,7 @@ class ReportController extends Controller
$cache->addProperty($start);
$cache->addProperty($accounts);
$cache->addProperty($end);
$cache->addProperty($this->convertToPrimary);
if ($cache->has()) {
return response()->json($cache->get());
}
@@ -177,17 +178,32 @@ class ReportController extends Controller
foreach ($journals as $journal) {
$period = $journal['date']->format($format);
$currencyId = (int) $journal['currency_id'];
$currencySymbol = (string) $journal['currency_symbol'];
$currencyCode = (string) $journal['currency_code'];
$currencyName = (string) $journal['currency_name'];
$currencyDecimalPlaces = (int) $journal['currency_decimal_places'];
$amount = (string) $journal['amount'];
if ($this->convertToPrimary && null !== $this->primaryCurrency && $journal['currency_id'] !== $this->primaryCurrency->id) {
$currencyId = $this->primaryCurrency->id;
$currencySymbol = $this->primaryCurrency->symbol;
$currencyCode = $this->primaryCurrency->code;
$currencyName = $this->primaryCurrency->name;
$currencyDecimalPlaces = $this->primaryCurrency->decimal_places;
$amount = $journal['foreign_currency_id'] === $this->primaryCurrency->id ? $journal['foreign_amount'] : $journal['pc_amount'];
}
$data[$currencyId] ??= [
'currency_id' => $currencyId,
'currency_symbol' => $journal['currency_symbol'],
'currency_code' => $journal['currency_code'],
'currency_name' => $journal['currency_name'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'currency_symbol' => $currencySymbol,
'currency_code' => $currencyCode,
'currency_name' => $currencyName,
'currency_decimal_places' => $currencyDecimalPlaces,
];
$data[$currencyId][$period] ??= ['period' => $period, 'spent' => '0', 'earned' => '0'];
// in our outgoing?
$key = 'spent';
$amount = Steam::positive($journal['amount']);
$amount = Steam::positive($amount);
// deposit = incoming
// transfer or reconcile or opening balance, and these accounts are the destination.

View File

@@ -81,7 +81,7 @@ class SendsTestNotification
return;
}
Log::debug(sprintf('Will send %s as a notification.', $class));
NotificationSender::send($event->user, new $class());
NotificationSender::send($event->{$type}, new $class());
Log::debug(sprintf('If you see no errors above this line, test notification was sent over channel "%s"', $event->channel));
}
}

View File

@@ -48,6 +48,47 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
{
use UserGroupTrait;
#[Override]
public function countByDescription(string $value, bool $includeDeleted): int
{
$search = $this->user->transactionJournals()->where('description', $value);
if ($includeDeleted) {
$search->withTrashed();
}
return $search->count();
}
#[Override]
public function countByMeta(string $field, string $value, bool $includeDeleted): int
{
$search = TransactionJournalMeta::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')
->where('name', $field)
->where('data', json_encode($value))
->where('transaction_journals.user_id', $this->user->id)
;
if ($includeDeleted) {
$search->withTrashed();
}
return $search->count();
}
#[Override]
public function countByNotes(string $value, bool $includeDeleted): int
{
$search = Note::where('noteable_type', TransactionJournal::class)
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'notes.noteable_id')
->where('transaction_journals.user_id', $this->user->id)
->where('text', 'LIKE', sprintf('%%%s%%', $value))
;
if ($includeDeleted) {
$search->withTrashed();
}
return $search->count();
}
public function destroyGroup(TransactionGroup $transactionGroup): void
{
/** @var TransactionGroupDestroyService $service */

View File

@@ -47,6 +47,12 @@ use Illuminate\Support\Collection;
*/
interface JournalRepositoryInterface
{
public function countByDescription(string $value, bool $includeDeleted): int;
public function countByMeta(string $field, string $value, bool $includeDeleted): int;
public function countByNotes(string $value, bool $includeDeleted): int;
/**
* Deletes a transaction group.
*/

View File

@@ -68,17 +68,17 @@ class GitHubUpdateRequest implements UpdateRequestInterface
// if current version is "develop", compare date.
if (str_contains($currentVersion, 'develop')) {
Log::debug(sprintf('Compare with current version "%s", built on %s', $currentVersion, $currentBuild->format('Y-m-d H:i')));
if ($currentBuild->gt($newest['published_at'])) {
if ($currentBuild->lt($newest['published_at']) && $currentBuild->diffInMinutes($newest['published_at']) > 10) {
Log::debug(sprintf(
'Current build %s is older than newest build %s, so a new release is available.',
$currentBuild->format('Y-m-d H:i'),
$newest['published_at']->format('Y-m-d H:i')
$currentBuild->format('Y-m-d H:i:s e'),
$newest['published_at']->format('Y-m-d H:i:s e')
));
$response->setNewVersionAvailable(true);
return $response;
}
if ($currentBuild->lt($newest['published_at'])) {
if ($currentBuild->gt($newest['published_at'])) {
Log::debug(sprintf(
'Current build %s is newer than newest build %s, so NO new release is available.',
$currentBuild->format('Y-m-d H:i'),
@@ -110,7 +110,8 @@ class GitHubUpdateRequest implements UpdateRequestInterface
private function filterReleases(array $releases): array
{
$return = [];
$return = [];
$weekAgo = now()->subWeek();
/** @var array $release */
foreach ($releases as $release) {
@@ -119,6 +120,12 @@ class GitHubUpdateRequest implements UpdateRequestInterface
continue;
}
// new version must be at least a week old, unless it is a develop release.
if ($release['published_at']->gt($weekAgo) && !str_contains($release['version'], 'develop')) {
Log::debug(sprintf('Skip too new version "%s"', $release['version']));
continue;
}
// if channel is stable, and version is "alpha", continue.
// if channel is stable, and version is "beta", continue.
// if channel is beta, and version is "alpha", continue.
@@ -140,7 +147,7 @@ class GitHubUpdateRequest implements UpdateRequestInterface
private function getNewest(array $releases): array
{
$latest = ['version' => '1.0.0', 'published_at' => now()->startOfYear()];
$latest = ['version' => '1.0.0', 'published_at' => now(config('app.timezone'))->startOfYear()];
foreach ($releases as $release) {
Log::debug(sprintf('Comparing current version "%s" with latest version "%s"', $release['version'], $latest['version']));
if (str_contains($release['version'], 'develop') || str_contains($latest['version'], 'develop')) {
@@ -165,7 +172,7 @@ class GitHubUpdateRequest implements UpdateRequestInterface
}
}
}
Log::debug(sprintf('Latest version seems to be "%s", released at %s', $latest['version'], $latest['published_at']->format('Y-m-d H:i')));
Log::debug(sprintf('Latest version seems to be "%s", released at %s', $latest['version'], $latest['published_at']->format('Y-m-d H:i e')));
return $latest;
}
@@ -202,7 +209,7 @@ class GitHubUpdateRequest implements UpdateRequestInterface
foreach ($json as $release) {
$version = $release['tag_name'];
$version = 'v' === $version[0] ? substr($version, 1) : $version;
$published = Carbon::parse($release['published_at']);
$published = Carbon::parse($release['published_at'], config('app.timezone'));
// always skip "develop" releases, unless user is also running develop.
if (str_contains($version, 'develop') && !str_contains($this->currentVersion, 'develop')) {

View File

@@ -1,252 +0,0 @@
<?php
/**
* UpdateRequest.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Services\FireflyIIIOrg\Update;
use Carbon\Carbon;
use FireflyIII\Events\Security\System\SystemFoundNewVersionOnline;
use FireflyIII\Support\System\IsOldVersion;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Log;
use JsonException;
use function Safe\json_decode;
/**
* Class UpdateRequest
*/
class UpdateRequest implements UpdateRequestInterface
{
use IsOldVersion;
public function getUpdateInformation(string $channel): array
{
Log::debug(sprintf('Now in getUpdateInformation(%s)', $channel));
$information = ['level' => 'error', 'message' => (string) trans('firefly.unknown_error')];
// try to get array from update server:
$updateInfo = $this->contactServer($channel);
if ('error' === $updateInfo['level']) {
Log::error('Update information contains an error.');
Log::error($updateInfo['message']);
$information['message'] = $updateInfo['message'];
return $information;
}
// if no error, parse the result and return
return $this->parseResult($updateInfo);
}
private function contactServer(string $channel): array
{
Log::debug(sprintf('Now in contactServer(%s)', $channel));
// always fall back to current version:
$return = [
'version' => config('firefly.version'),
'date' => today(config('app.timezone'))->startOfDay(),
'level' => 'error',
'message' => (string) trans('firefly.unknown_error'),
];
$url = config('firefly.update_endpoint');
Log::debug(sprintf('Going to call %s', $url));
try {
$client = new Client();
$options = ['headers' => ['User-Agent' => sprintf('FireflyIII/%s/%s', config('firefly.version'), $channel)], 'timeout' => 3.1415];
$res = $client->request('GET', $url, $options);
} catch (GuzzleException $e) {
Log::error('Ran into Guzzle error.');
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
$return['message'] = sprintf('Guzzle: %s', strip_tags($e->getMessage()));
return $return;
}
if (200 !== $res->getStatusCode()) {
Log::error(sprintf('Response status from server is %d.', $res->getStatusCode()));
Log::error((string) $res->getBody());
$return['message'] = sprintf('Error: %d', $res->getStatusCode());
return $return;
}
$body = (string) $res->getBody();
try {
$json = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
} catch (JsonException) {
Log::error('Body is not valid JSON');
Log::error($body);
$return['message'] = 'Invalid JSON :(';
return $return;
}
if (!array_key_exists($channel, $json['firefly_iii'])) {
Log::error(sprintf('No valid update channel "%s"', $channel));
Log::error($body);
$return['message'] = sprintf('Unknown update channel "%s" :(', $channel);
}
// parse response a bit. No message yet.
$response = $json['firefly_iii'][$channel];
$date = Carbon::createFromFormat('Y-m-d', $response['date']);
if (!$date instanceof Carbon) {
$date = today(config('app.timezone'));
}
$return['version'] = $response['version'];
$return['level'] = 'success';
$return['date'] = $date->startOfDay();
Log::info('Response from update server', $response);
return $return;
}
/**
* TODO make shorter
*/
private function parseResult(array $information): array
{
Log::debug('Now in parseResult()', $information);
$current = (string) config('firefly.version');
$latest = (string) $information['version'];
// strip the 'v' from the version if it's there.
if (str_starts_with($latest, 'v')) {
$latest = substr($latest, 1);
}
if (str_starts_with($current, 'develop')) {
return $this->parseResultDevelop($current, $latest);
}
$compare = version_compare($latest, $current);
Log::debug(sprintf('Current version is "%s", latest is "%s", result is: %d', $current, $latest, $compare));
// -1: you're running a newer version:
if (-1 === $compare) {
return $this->runsNewerVersion($current, $latest);
}
// running the current version:
if (0 === $compare) {
return $this->runsSameVersion($current);
}
// a newer version is available!
/** @var Carbon $released */
$released = $information['date'];
$isBeta = $information['is_beta'] ?? false;
$isAlpha = $information['is_alpha'] ?? false;
// it's new but alpha:
if (true === $isAlpha) {
return $this->releasedNewAlpha($current, $latest, $released);
}
if (true === $isBeta) {
return $this->releasedNewBeta($current, $latest, $released);
}
return $this->releasedNewVersion($current, $latest, $released);
}
private function parseResultDevelop(string $current, string $latest): array
{
Log::debug(sprintf('User is running develop version "%s"', $current));
$compare = $this->compareDevelopVersions($current, $latest);
$return = [];
if (-1 === $compare) {
$return['level'] = 'info';
$return['message'] = (string) trans('firefly.update_current_dev_older', ['version' => $current, 'new_version' => $latest]);
return $return;
}
$return['level'] = 'info';
$return['message'] = (string) trans('firefly.update_current_dev_newer', ['version' => $current, 'new_version' => $latest]);
return $return;
}
private function releasedNewAlpha(string $current, string $latest, Carbon $date): array
{
Log::debug('New release is also a alpha!');
$message = (string) trans('firefly.update_new_version_alert', [
'your_version' => $current,
'new_version' => $latest,
'date' => $date->isoFormat((string) trans('config.month_and_day_js')),
]);
return ['level' => 'success', 'message' => sprintf('%s %s', $message, trans('firefly.update_version_alpha'))];
}
private function releasedNewBeta(string $current, string $latest, Carbon $date): array
{
Log::debug('New release is also a beta!');
$message = (string) trans('firefly.update_new_version_alert', [
'your_version' => $current,
'new_version' => $latest,
'date' => $date->isoFormat((string) trans('config.month_and_day_js')),
]);
return ['level' => 'success', 'message' => sprintf('%s %s', $message, trans('firefly.update_version_beta'))];
}
private function releasedNewVersion(string $current, string $latest, Carbon $date): array
{
Log::debug('New release is old enough.');
$message = (string) trans('firefly.update_new_version_alert', [
'your_version' => $current,
'new_version' => $latest,
'date' => $date->isoFormat((string) trans('config.month_and_day_js')),
]);
Log::debug('New release is here!', [$message]);
event(new SystemFoundNewVersionOnline($message));
return ['level' => 'success', 'message' => $message];
}
private function runsNewerVersion(string $current, string $latest): array
{
$return = [
'level' => 'info',
'message' => (string) trans('firefly.update_newer_version_alert', ['your_version' => $current, 'new_version' => $latest]),
];
Log::debug('User is running a newer version', $return);
return $return;
}
private function runsSameVersion(string $current): array
{
$return = ['level' => 'info', 'message' => (string) trans('firefly.update_current_version_alert', ['version' => $current])];
Log::debug('User is the current version.', $return);
return $return;
}
}

View File

@@ -174,6 +174,18 @@ class ExportDataGenerator
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
public function __construct()
{
$this->accounts = new Collection();

View File

@@ -40,92 +40,8 @@ use Override;
class AvailableBudgetEnrichment implements EnrichmentInterface
{
private Collection $collection; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private readonly bool $convertToPrimary; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private Collection $collection;
private readonly bool $convertToPrimary;
private array $currencies = [];
private array $currencyIds = [];
private array $ids = [];

View File

@@ -40,49 +40,7 @@ use Illuminate\Support\Facades\Log;
class BudgetLimitEnrichment implements EnrichmentInterface
{
private Collection $collection;
private readonly bool $convertToPrimary; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private readonly bool $convertToPrimary;
private array $currencies = [];
private array $currencyIds = [];
private Carbon $end;

View File

@@ -42,92 +42,8 @@ use Illuminate\Support\Facades\Log;
class PiggyBankEnrichment implements EnrichmentInterface
{
private array $accountIds = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $accounts = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $accountIds = [];
private array $accounts = [];
private array $amounts = [];
private Collection $collection;
private array $currencies = [];

View File

@@ -37,92 +37,8 @@ use Illuminate\Support\Facades\Log;
class PiggyBankEventEnrichment implements EnrichmentInterface
{
private array $accountCurrencies = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $accountIds = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $accountCurrencies = [];
private array $accountIds = [];
private Collection $collection;
private array $currencies = [];
private array $groupIds = [];

View File

@@ -46,49 +46,7 @@ use Illuminate\Support\Facades\Log;
class SubscriptionEnrichment implements EnrichmentInterface
{
private BillDateCalculator $calculator;
private Collection $collection; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private Collection $collection;
private readonly bool $convertToPrimary;
private ?Carbon $end = null;
private array $mappedObjects = [];

View File

@@ -53,91 +53,7 @@ class TransactionGroupEnrichment implements EnrichmentInterface
private array $metaData = [];
private array $notes = [];
private readonly TransactionCurrency $primaryCurrency;
private array $tags = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $tags = [];
public function __construct()
{

View File

@@ -42,92 +42,8 @@ use stdClass;
class WebhookEnrichment implements EnrichmentInterface
{
private Collection $collection;
private array $deliveries = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $ids = []; // @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
// @phpstan-ignore-line
private array $deliveries = [];
private array $ids = [];
private array $responses = [];
private array $triggers = [];
private array $webhookDeliveries = [];

View File

@@ -143,7 +143,6 @@ class AvailableBudgetCalculator
$availableBudget = $this->abRepository->find($this->currency, $start, $end);
$availableBudgets = $this->abRepository->findInRange($this->currency, $start, $end);
Log::debug(sprintf('Found #%d', $availableBudget->id));
foreach ($availableBudgets as $item) {
Log::debug(sprintf(
'findInRange found available budget #%d (%s - %s), will update it.',

View File

@@ -8,12 +8,23 @@ This project adheres to [Semantic Versioning](http://semver.org/).
> [!IMPORTANT]
> This release is the same as 6.4.23, but only works on PHP 8.5 and higher. To continue using the latest version of Firefly III, you must upgrade to (at least) PHP 8.5.0, or switch to the Docker containers. Read more about Firefly III's release and support schedule in [`releases.md`](releases.md).
And yes, despite my goal not to change things, some very clever users (that's you!) found some interesting bugs that will not make it back to 6.4.x.
### Added
- Support for PHP 8.5
### Changed
- [PR 11776](https://github.com/firefly-iii/firefly-iii/pull/11776) (Convert to primary currency for charts) reported by @dakennguyen
- The update check now contacts GitHub directly.
### Removed
- Support for PHP 8.4 and earlier
### Fixed
- [Discussion 11685](https://github.com/orgs/firefly-iii/discussions/11685) (Yearly budget best practices) started by @molnarti
- [Issue 11778](https://github.com/firefly-iii/firefly-iii/issues/11778) (API update rule trigger only accepts "store-journal") reported by @jhns-de
- Test notification was broken for system owners.
## v6.4.23 - 2026-02-20
> [!WARNING]

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2026-02-21',
'build_time' => 1771652199,
'version' => 'develop/2026-02-22',
'build_time' => 1771741082,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.

12
package-lock.json generated
View File

@@ -4597,9 +4597,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001770",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001770.tgz",
"integrity": "sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==",
"version": "1.0.30001772",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001772.tgz",
"integrity": "sha512-mIwLZICj+ntVTw4BT2zfp+yu/AqV6GMKfJVJMx3MwPxs+uk/uj2GLl2dH8LQbjiLDX66amCga5nKFyDgRR43kg==",
"dev": true,
"funding": [
{
@@ -8328,9 +8328,9 @@
"license": "MIT"
},
"node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz",
"integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==",
"dev": true,
"license": "ISC",
"dependencies": {

View File

@@ -699,6 +699,7 @@ Route::group(
],
static function (): void {
Route::get('transactions', ['uses' => 'TransactionController@search', 'as' => 'transactions']);
Route::get('transactions/count', ['uses' => 'TransactionController@count', 'as' => 'count']);
Route::get('accounts', ['uses' => 'AccountController@search', 'as' => 'accounts']);
}
);