mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-21 10:59:30 +00:00
Compare commits
12 Commits
develop-20
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ad1420262 | ||
|
|
018f68b789 | ||
|
|
e23d0de8f9 | ||
|
|
04c3bf966d | ||
|
|
681619f732 | ||
|
|
cab298708c | ||
|
|
c4392f89d1 | ||
|
|
36789a310a | ||
|
|
e92a1b6dda | ||
|
|
1d687a632f | ||
|
|
1fa4a1bdc8 | ||
|
|
aee53cffb9 |
@@ -43,6 +43,7 @@ return $config->setRules(
|
||||
// rule sets
|
||||
'@PHP8x3Migration' => true,
|
||||
'@PHP8x4Migration' => true,
|
||||
'@PHP8x5Migration' => true,
|
||||
'@PhpCsFixer' => true,
|
||||
'@PhpCsFixer:risky' => true,
|
||||
'@PSR12' => true,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"require": {
|
||||
"php": ">=8.5.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.12"
|
||||
}
|
||||
}
|
||||
|
||||
6
.ci/php-cs-fixer/composer.lock
generated
6
.ci/php-cs-fixer/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f1e0b38af4ded66da271a99d2bff5be8",
|
||||
"content-hash": "35b5ad9b3c4e1ffe78ef9bec73987499",
|
||||
"packages": [
|
||||
{
|
||||
"name": "clue/ndjson-react",
|
||||
@@ -2683,7 +2683,9 @@
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {},
|
||||
"platform": {
|
||||
"php": ">=8.5.0"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class TransactionRequest extends FormRequest
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return ['query' => ['required', 'min:1', 'max:255', 'json', new IsValidBulkClause(ClauseType::TRANSACTION)]];
|
||||
return ['query' => ['required', 'min:1', 'max:255', 'json', new IsValidBulkClause(ClauseType::TRANSACTION->value)]];
|
||||
}
|
||||
|
||||
public function withValidator(Validator $validator): void
|
||||
|
||||
99
app/Console/Commands/Tools/ChecksForUpdates.php
Normal file
99
app/Console/Commands/Tools/ChecksForUpdates.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* ChecksForUpdates.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\Console\Commands\Tools;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ChecksForUpdates extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'firefly-iii:check-for-updates {--force}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Checks for Firefly III updates';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$build = Carbon::createFromTimestamp(config('firefly.build_time'), config('app.timezone'));
|
||||
$version = config('firefly.version');
|
||||
|
||||
$this->friendlyLine(sprintf('You are running version "%s", built on %s', $version, $build->format('Y-m-d H:i')));
|
||||
$permission = FireflyConfig::get('permission_update_check', -1)->data;
|
||||
if (1 !== $permission && false === $this->option('force')) {
|
||||
$this->friendlyWarning('Checking for updates is disabled. To overrule, use --force.');
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
if (str_contains(config('firefly.version'), 'develop')) {
|
||||
$this->friendlyWarning('You are running a development version.');
|
||||
}
|
||||
|
||||
/** @var UpdateRequestInterface $request */
|
||||
$request = app(UpdateRequestInterface::class);
|
||||
// stable, alpha or beta
|
||||
$info = $request->getUpdateInformation($version, $build, 'stable');
|
||||
|
||||
if ('' !== $info->getError()) {
|
||||
$this->friendlyError($info->getError());
|
||||
|
||||
return Command::FAILURE;
|
||||
}
|
||||
if (!$info->isNewVersionAvailable()) {
|
||||
$this->friendlyInfo(trans('firefly.no_new_release_available'));
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
// if running develop, slightly different message.
|
||||
if (str_contains($version, 'develop')) {
|
||||
$this->friendlyInfo(trans('firefly.update_current_dev_older', ['version' => $version, 'new_version' => $info->getNewVersion()]));
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
$this->friendlyInfo(trans('firefly.update_new_version_alert', [
|
||||
'your_version' => $version,
|
||||
'new_version' => $info->getNewVersion(),
|
||||
'date' => $info->getPublishedAt()->format('Y-m-d H:i:s'),
|
||||
]));
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* AccountBalance.php
|
||||
* Copyright (c) 2024 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\Entities;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
class AccountBalance
|
||||
{
|
||||
public string $amount;
|
||||
public string $currencyId;
|
||||
public string $id;
|
||||
|
||||
public static function fromArray(): self
|
||||
{
|
||||
$balance = new self();
|
||||
$balance->id = (string) random_int(1, 1000);
|
||||
// $balance->name = (string) random_int(1, 1000);
|
||||
$balance->amount = (string) random_int(1, 1000);
|
||||
$balance->currencyId = '1';
|
||||
|
||||
return $balance;
|
||||
}
|
||||
|
||||
public function getAccount(): Account
|
||||
{
|
||||
return Account::inRandomOrder()->first();
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,9 @@ namespace FireflyIII\Enums;
|
||||
/**
|
||||
* Class ClauseType
|
||||
*/
|
||||
class ClauseType
|
||||
enum ClauseType: string
|
||||
{
|
||||
public const string TRANSACTION = 'transaction';
|
||||
public const string UPDATE = 'update';
|
||||
public const string WHERE = 'where';
|
||||
case TRANSACTION = 'transaction';
|
||||
case UPDATE = 'update';
|
||||
case WHERE = 'where';
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Helpers\Update;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateResponse;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -38,7 +40,7 @@ trait UpdateTrait
|
||||
* 'message' => 'A new version is available.
|
||||
* 'level' => 'info' / 'success' / 'error'
|
||||
*/
|
||||
public function getLatestRelease(): array
|
||||
public function getLatestRelease(): UpdateResponse
|
||||
{
|
||||
Log::debug('Now in getLatestRelease()');
|
||||
|
||||
@@ -46,7 +48,9 @@ trait UpdateTrait
|
||||
$checker = app(UpdateRequestInterface::class);
|
||||
$channelConfig = FireflyConfig::get('update_channel', 'stable');
|
||||
$channel = (string) $channelConfig->data;
|
||||
$build = Carbon::createFromTimestamp(config('firefly.build_time'), config('app.timezone'));
|
||||
$version = config('firefly.version');
|
||||
|
||||
return $checker->getUpdateInformation($channel);
|
||||
return $checker->getUpdateInformation($version, $build, $channel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,8 +114,27 @@ class UpdateController extends Controller
|
||||
public function updateCheck(): RedirectResponse
|
||||
{
|
||||
$release = $this->getLatestRelease();
|
||||
$level = 'info';
|
||||
$message = trans('firefly.no_new_release_available');
|
||||
if ('' !== $release->getError()) {
|
||||
$level = 'error';
|
||||
$message = $release->getError();
|
||||
}
|
||||
if ($release->isNewVersionAvailable()) {
|
||||
// if running develop, slightly different message.
|
||||
if (str_contains(config('firefly.version'), 'develop')) {
|
||||
$message = trans('firefly.update_current_dev_older', ['version' => config('firefly.version'), 'new_version' => $release->getNewVersion()]);
|
||||
}
|
||||
if (!str_contains(config('firefly.version'), 'develop')) {
|
||||
$message = trans('firefly.update_new_version_alert', [
|
||||
'your_version' => config('firefly.version'),
|
||||
'new_version' => $release->getNewVersion(),
|
||||
'date' => $release->getPublishedAt()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
session()->flash($release['level'], $release['message']);
|
||||
session()->flash($level, $message);
|
||||
|
||||
return redirect(route('settings.update-check'));
|
||||
}
|
||||
|
||||
@@ -76,8 +76,27 @@ class ChecksForNewVersion implements ShouldQueue
|
||||
// last check time was more than a week ago.
|
||||
Log::debug('Have not checked for a new version in a week!');
|
||||
$release = $this->getLatestRelease();
|
||||
$level = 'info';
|
||||
$message = trans('firefly.no_new_release_available');
|
||||
if ('' !== $release->getError()) {
|
||||
$level = 'error';
|
||||
$message = $release->getError();
|
||||
}
|
||||
if ($release->isNewVersionAvailable()) {
|
||||
// if running develop, slightly different message.
|
||||
if (str_contains(config('firefly.version'), 'develop')) {
|
||||
$message = trans('firefly.update_current_dev_older', ['version' => config('firefly.version'), 'new_version' => $release->getNewVersion()]);
|
||||
}
|
||||
if (!str_contains(config('firefly.version'), 'develop')) {
|
||||
$message = trans('firefly.update_new_version_alert', [
|
||||
'your_version' => config('firefly.version'),
|
||||
'new_version' => $release->getNewVersion(),
|
||||
'date' => $release->getPublishedAt()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
session()->flash($release['level'], $release['message']);
|
||||
session()->flash($level, $message);
|
||||
FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Deprecated;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -32,65 +31,9 @@ class AccountType extends Model
|
||||
{
|
||||
use ReturnsIntegerIdTrait;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string ASSET = 'Asset account';
|
||||
protected $casts = ['created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string BENEFICIARY = 'Beneficiary account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string CASH = 'Cash account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string CREDITCARD = 'Credit card';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string DEBT = 'Debt';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string DEFAULT = 'Default account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string EXPENSE = 'Expense account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string IMPORT = 'Import account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string INITIAL_BALANCE = 'Initial balance account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string LIABILITY_CREDIT = 'Liability credit account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string LOAN = 'Loan';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string MORTGAGE = 'Mortgage';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string RECONCILIATION = 'Reconciliation account';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string REVENUE = 'Revenue account';
|
||||
|
||||
protected $casts = ['created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected $fillable = ['type'];
|
||||
protected $fillable = ['type'];
|
||||
|
||||
public function accounts(): HasMany
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Deprecated;
|
||||
use FireflyIII\Handlers\Observer\AutoBudgetObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
@@ -39,20 +38,8 @@ class AutoBudget extends Model
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int AUTO_BUDGET_ADJUSTED = 3;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int AUTO_BUDGET_RESET = 1;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int AUTO_BUDGET_ROLLOVER = 2;
|
||||
|
||||
protected $casts = ['amount' => 'string', 'native_amount' => 'string'];
|
||||
protected $fillable = ['budget_id', 'amount', 'period', 'native_amount'];
|
||||
protected $casts = ['amount' => 'string', 'native_amount' => 'string'];
|
||||
protected $fillable = ['budget_id', 'amount', 'period', 'native_amount'];
|
||||
|
||||
public function budget(): BelongsTo
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Deprecated;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -36,23 +35,7 @@ class RecurrenceRepetition extends Model
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int WEEKEND_DO_NOTHING = 1;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int WEEKEND_SKIP_CREATION = 2;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int WEEKEND_TO_FRIDAY = 3;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const int WEEKEND_TO_MONDAY = 4;
|
||||
|
||||
protected $casts = [
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
@@ -62,9 +45,9 @@ class RecurrenceRepetition extends Model
|
||||
'weekend' => 'int',
|
||||
];
|
||||
|
||||
protected $fillable = ['recurrence_id', 'weekend', 'repetition_type', 'repetition_moment', 'repetition_skip'];
|
||||
protected $fillable = ['recurrence_id', 'weekend', 'repetition_type', 'repetition_moment', 'repetition_skip'];
|
||||
|
||||
protected $table = 'recurrences_repetitions';
|
||||
protected $table = 'recurrences_repetitions';
|
||||
|
||||
public function recurrence(): BelongsTo
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@ use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
@@ -39,7 +38,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
#[ObservedBy([TransactionObserver::class])]
|
||||
class Transaction extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
@@ -53,7 +52,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
#[ObservedBy([DeletedTransactionJournalObserver::class])]
|
||||
class TransactionJournal extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use ReturnsIntegerIdTrait;
|
||||
use ReturnsIntegerUserIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Deprecated;
|
||||
use FireflyIII\Enums\TransactionTypeEnum;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -36,36 +35,8 @@ class TransactionType extends Model
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string DEPOSIT = 'Deposit';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string INVALID = 'Invalid';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string LIABILITY_CREDIT = 'Liability credit';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string OPENING_BALANCE = 'Opening balance';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string RECONCILIATION = 'Reconciliation';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string TRANSFER = 'Transfer';
|
||||
|
||||
/** @deprecated */
|
||||
#[Deprecated]
|
||||
public const string WITHDRAWAL = 'Withdrawal';
|
||||
|
||||
protected $casts = ['created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime'];
|
||||
protected $fillable = ['type'];
|
||||
protected $casts = ['created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime'];
|
||||
protected $fillable = ['type'];
|
||||
|
||||
/**
|
||||
* Route binder. Converts the key in the URL to the specified object (or throw 404).
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* AccountPolicy.php
|
||||
* Copyright (c) 2024 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\Policies;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class AccountPolicy
|
||||
{
|
||||
public function create(): bool
|
||||
{
|
||||
return auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO needs better authentication, also for group.
|
||||
*/
|
||||
public function view(User $user, Account $account): bool
|
||||
{
|
||||
return auth()->check() && $user->id === $account->user_id;
|
||||
}
|
||||
|
||||
public function viewAccountBalances(User $user, Account $account): bool
|
||||
{
|
||||
return $this->view($user, $account);
|
||||
}
|
||||
|
||||
/**
|
||||
* Everybody can do this, but selection should limit to user.
|
||||
*/
|
||||
public function viewAny(): bool
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Everybody can do this, but selection should limit to user.
|
||||
*/
|
||||
public function viewUser(User $user, Account $account): bool
|
||||
{
|
||||
return $this->view($user, $account);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* BalancePolicy.php
|
||||
* Copyright (c) 2024 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\Policies;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\User;
|
||||
|
||||
class BalancePolicy
|
||||
{
|
||||
/**
|
||||
* TODO needs better authentication.
|
||||
*/
|
||||
public function view(User $user, Account $account): bool
|
||||
{
|
||||
return auth()->check() && $user->id === $account->user_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Everybody can do this, but selection should limit to user.
|
||||
*/
|
||||
public function viewAny(): bool
|
||||
{
|
||||
return auth()->check();
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* UserPolicy.php
|
||||
* Copyright (c) 2024 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\Policies;
|
||||
|
||||
use FireflyIII\User;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
/**
|
||||
* TODO needs better authentication.
|
||||
*/
|
||||
public function view(User $user, User $user1): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
// return auth()->check() && $user->id === $account->user_id;
|
||||
}
|
||||
|
||||
public function viewAccounts(User $user): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
// return auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Everybody can do this, but selection should limit to user.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
public function viewAny(): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
// return auth()->check();
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ use FireflyIII\Repositories\UserGroup\UserGroupRepository;
|
||||
use FireflyIII\Repositories\UserGroup\UserGroupRepositoryInterface;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepository;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\GitHubUpdateRequest;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequest;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
|
||||
use FireflyIII\Services\Password\PwndVerifierV2;
|
||||
@@ -191,7 +192,8 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
$this->app->bind(PopupReportInterface::class, PopupReport::class);
|
||||
$this->app->bind(ReportHelperInterface::class, ReportHelper::class);
|
||||
$this->app->bind(FiscalHelperInterface::class, FiscalHelper::class);
|
||||
$this->app->bind(UpdateRequestInterface::class, UpdateRequest::class);
|
||||
// $this->app->bind(UpdateRequestInterface::class, UpdateRequest::class);
|
||||
$this->app->bind(UpdateRequestInterface::class, GitHubUpdateRequest::class);
|
||||
|
||||
// webhooks:
|
||||
$this->app->bind(MessageGeneratorInterface::class, StandardMessageGenerator::class);
|
||||
|
||||
219
app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
Normal file
219
app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
Normal file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* GitHubUpdateRequest.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\Services\FireflyIIIOrg\Update;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Override;
|
||||
|
||||
class GitHubUpdateRequest implements UpdateRequestInterface
|
||||
{
|
||||
private string $currentVersion = '1.0.0';
|
||||
private Carbon $currentBuild;
|
||||
private string $channel = 'stable';
|
||||
private bool $localDebug = false;
|
||||
|
||||
#[Override]
|
||||
public function getUpdateInformation(string $currentVersion, Carbon $currentBuild, string $channel): UpdateResponse
|
||||
{
|
||||
$this->currentVersion = $currentVersion;
|
||||
$this->channel = $channel;
|
||||
$this->currentBuild = $currentBuild;
|
||||
Log::debug(sprintf('Now in getUpdateInformation(%s, %s)', $currentVersion, $channel));
|
||||
|
||||
$response = new UpdateResponse();
|
||||
$releases = $this->getReleases();
|
||||
$filtered = $this->filterReleases($releases);
|
||||
|
||||
Log::debug(sprintf('Left with %d release(s) to compare', count($filtered)));
|
||||
|
||||
if (0 === count($filtered)) {
|
||||
$response->setNewVersionAvailable(false);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
$newest = $this->getNewest($filtered);
|
||||
|
||||
Log::debug(sprintf('Newest release is "%s" released on %s', $newest['version'], $newest['published_at']->format('Y-m-d H:i')));
|
||||
|
||||
$response->setNewVersion($newest['version']);
|
||||
$response->setPublishedAt($newest['published_at']);
|
||||
|
||||
// main question, is this release newer than the current one?
|
||||
// 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'])) {
|
||||
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')
|
||||
));
|
||||
$response->setNewVersionAvailable(true);
|
||||
|
||||
return $response;
|
||||
}
|
||||
if ($currentBuild->lt($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'),
|
||||
$newest['published_at']->format('Y-m-d H:i')
|
||||
));
|
||||
$response->setNewVersionAvailable(false);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
// if not, compare version.
|
||||
$res = version_compare($newest['version'], $currentVersion);
|
||||
if ($res < 1) {
|
||||
$response->setNewVersionAvailable(false);
|
||||
|
||||
return $response;
|
||||
}
|
||||
if (1 === $res) {
|
||||
$response->setNewVersionAvailable(true);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
private function filterReleases(array $releases): array
|
||||
{
|
||||
$return = [];
|
||||
|
||||
/** @var array $release */
|
||||
foreach ($releases as $release) {
|
||||
if ($release['published_at']->lte($this->currentBuild)) {
|
||||
Log::debug(sprintf('Skip older 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.
|
||||
if (('stable' === $this->channel || 'beta' === $this->channel) && str_contains($release['version'], 'alpha')) {
|
||||
Log::debug(sprintf('Skip version "%s"', $release['version']));
|
||||
|
||||
continue;
|
||||
}
|
||||
if ('stable' === $this->channel && str_contains($release['version'], 'beta')) {
|
||||
Log::debug(sprintf('Skip version "%s"', $release['version']));
|
||||
|
||||
continue;
|
||||
}
|
||||
$return[] = $release;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
private function getNewest(array $releases): array
|
||||
{
|
||||
$latest = ['version' => '1.0.0', 'published_at' => now()->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')) {
|
||||
Log::debug('Compare based on build time.');
|
||||
// compare build times.
|
||||
if ($latest['published_at']->lt($release['published_at'])) {
|
||||
Log::debug(sprintf(
|
||||
'Current date "%s" is newer than latest date "%s"',
|
||||
$release['published_at']->format('Y-m-d H:i'),
|
||||
$latest['published_at']->format('Y-m-d H:i')
|
||||
));
|
||||
$latest = $release;
|
||||
}
|
||||
}
|
||||
if (!str_contains($release['version'], 'develop') && !str_contains($latest['version'], 'develop')) {
|
||||
Log::debug('[a] Compare based on version.');
|
||||
// compare version.
|
||||
$res = version_compare($release['version'], $latest['version']);
|
||||
if (1 === $res) {
|
||||
Log::debug(sprintf('Version "%s" is newer than version "%s".', $release['version'], $latest['version']));
|
||||
$latest = $release;
|
||||
}
|
||||
}
|
||||
}
|
||||
Log::debug(sprintf('Latest version seems to be "%s", released at %s', $latest['version'], $latest['published_at']->format('Y-m-d H:i')));
|
||||
|
||||
return $latest;
|
||||
}
|
||||
|
||||
private function getReleases(): array
|
||||
{
|
||||
$client = new Client();
|
||||
$opts = ['headers' => ['User-Agent' => 'FireflyIII/'.config('firefly.version')]];
|
||||
$return = [];
|
||||
$body = '';
|
||||
if ($this->localDebug && file_exists('json.json')) {
|
||||
$body = file_get_contents('json.json');
|
||||
}
|
||||
if (!$this->localDebug) {
|
||||
try {
|
||||
$res = $client->get('https://api.github.com/repos/firefly-iii/firefly-iii/releases', $opts);
|
||||
} catch (ClientException $e) {
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return [];
|
||||
}
|
||||
Log::debug('Successfully contacted GitHub');
|
||||
$body = (string) $res->getBody();
|
||||
}
|
||||
|
||||
if (!json_validate($body)) {
|
||||
Log::debug('GitHub returned invalid JSON');
|
||||
|
||||
return [];
|
||||
}
|
||||
$json = json_decode($body, true);
|
||||
|
||||
/** @var array $release */
|
||||
foreach ($json as $release) {
|
||||
$version = $release['tag_name'];
|
||||
$version = 'v' === $version[0] ? substr($version, 1) : $version;
|
||||
$published = Carbon::parse($release['published_at']);
|
||||
|
||||
// always skip "develop" releases, unless user is also running develop.
|
||||
if (str_contains($version, 'develop') && !str_contains($this->currentVersion, 'develop')) {
|
||||
Log::debug(sprintf('Skip version "%s"', $release['tag_name']));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$return[] = ['version' => $version, 'published_at' => $published];
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -24,10 +24,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\FireflyIIIOrg\Update;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* Interface UpdateRequestInterface
|
||||
*/
|
||||
interface UpdateRequestInterface
|
||||
{
|
||||
public function getUpdateInformation(string $channel): array;
|
||||
public function getUpdateInformation(string $currentVersion, Carbon $currentBuild, string $channel): UpdateResponse;
|
||||
}
|
||||
|
||||
75
app/Services/FireflyIIIOrg/Update/UpdateResponse.php
Normal file
75
app/Services/FireflyIIIOrg/Update/UpdateResponse.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* UpdateResponse.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\Services\FireflyIIIOrg\Update;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
class UpdateResponse
|
||||
{
|
||||
private bool $newVersionAvailable = false;
|
||||
private string $error = '';
|
||||
private string $newVersion = '1.0.0';
|
||||
private Carbon $publishedAt;
|
||||
|
||||
public function getError(): string
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
public function getNewVersion(): string
|
||||
{
|
||||
return $this->newVersion;
|
||||
}
|
||||
|
||||
public function getPublishedAt(): Carbon
|
||||
{
|
||||
return $this->publishedAt;
|
||||
}
|
||||
|
||||
public function isNewVersionAvailable(): bool
|
||||
{
|
||||
return $this->newVersionAvailable;
|
||||
}
|
||||
|
||||
public function setError(string $error): void
|
||||
{
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
public function setNewVersion(string $newVersion): void
|
||||
{
|
||||
$this->newVersion = $newVersion;
|
||||
}
|
||||
|
||||
public function setNewVersionAvailable(bool $newVersionAvailable): void
|
||||
{
|
||||
$this->newVersionAvailable = $newVersionAvailable;
|
||||
}
|
||||
|
||||
public function setPublishedAt(Carbon $publishedAt): void
|
||||
{
|
||||
$this->publishedAt = $publishedAt;
|
||||
}
|
||||
}
|
||||
@@ -75,12 +75,12 @@ class UpdateCheckCronjob extends AbstractCronjob
|
||||
// last check time was more than a week ago.
|
||||
Log::debug('Have not checked for a new version in a week!');
|
||||
$release = $this->getLatestRelease();
|
||||
if ('error' === $release['level']) {
|
||||
if ('' !== $release->getError()) {
|
||||
// get stuff from job:
|
||||
$this->jobFired = true;
|
||||
$this->jobErrored = true;
|
||||
$this->jobSucceeded = false;
|
||||
$this->message = $release['message'];
|
||||
$this->message = $release->getError();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -88,6 +88,23 @@ class UpdateCheckCronjob extends AbstractCronjob
|
||||
$this->jobFired = true;
|
||||
$this->jobErrored = false;
|
||||
$this->jobSucceeded = false;
|
||||
$this->message = $release['message'];
|
||||
$this->message = trans('firefly.no_new_release_available');
|
||||
|
||||
if ($release->isNewVersionAvailable()) {
|
||||
// if running develop, slightly different message.
|
||||
if (str_contains(config('firefly.version'), 'develop')) {
|
||||
$this->message = trans('firefly.update_current_dev_older', [
|
||||
'version' => config('firefly.version'),
|
||||
'new_version' => $release->getNewVersion(),
|
||||
]);
|
||||
}
|
||||
if (!str_contains(config('firefly.version'), 'develop')) {
|
||||
$this->message = trans('firefly.update_new_version_alert', [
|
||||
'your_version' => config('firefly.version'),
|
||||
'new_version' => $release->getNewVersion(),
|
||||
'date' => $release->getPublishedAt()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ class ExportDataGenerator
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->accounts = new Collection();
|
||||
|
||||
@@ -81,6 +81,8 @@ class AvailableBudgetEnrichment implements EnrichmentInterface
|
||||
// @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
|
||||
@@ -122,6 +124,8 @@ class AvailableBudgetEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private array $currencies = [];
|
||||
private array $currencyIds = [];
|
||||
private array $ids = [];
|
||||
|
||||
@@ -81,6 +81,8 @@ class BudgetLimitEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private array $currencies = [];
|
||||
private array $currencyIds = [];
|
||||
private Carbon $end;
|
||||
|
||||
@@ -83,6 +83,8 @@ class PiggyBankEnrichment implements EnrichmentInterface
|
||||
// @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
|
||||
@@ -124,6 +126,8 @@ class PiggyBankEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private array $amounts = [];
|
||||
private Collection $collection;
|
||||
private array $currencies = [];
|
||||
|
||||
@@ -78,6 +78,8 @@ class PiggyBankEventEnrichment implements EnrichmentInterface
|
||||
// @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
|
||||
@@ -119,6 +121,8 @@ class PiggyBankEventEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private Collection $collection;
|
||||
private array $currencies = [];
|
||||
private array $groupIds = [];
|
||||
|
||||
@@ -87,6 +87,8 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private readonly bool $convertToPrimary;
|
||||
private ?Carbon $end = null;
|
||||
private array $mappedObjects = [];
|
||||
|
||||
@@ -135,6 +135,10 @@ class TransactionGroupEnrichment implements EnrichmentInterface
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
// @phpstan-ignore-line
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->dateFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date'];
|
||||
|
||||
@@ -83,6 +83,8 @@ class WebhookEnrichment implements EnrichmentInterface
|
||||
// @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
|
||||
@@ -124,6 +126,8 @@ class WebhookEnrichment implements EnrichmentInterface
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
// @phpstan-ignore-line
|
||||
private array $responses = [];
|
||||
private array $triggers = [];
|
||||
private array $webhookDeliveries = [];
|
||||
|
||||
13
changelog.md
13
changelog.md
@@ -3,7 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v6.4.23
|
||||
## v6.5.0 - 2026-02-20
|
||||
|
||||
> [!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).
|
||||
|
||||
### Added
|
||||
- Support for PHP 8.5
|
||||
|
||||
### Removed
|
||||
- Support for PHP 8.4 and earlier
|
||||
|
||||
## v6.4.23 - 2026-02-20
|
||||
|
||||
> [!WARNING]
|
||||
> If no pressing issues get reported, this release will be followed by **v6.5.0**. It will be exactly the same but require PHP 8.5.
|
||||
|
||||
@@ -25,11 +25,11 @@ declare(strict_types=1);
|
||||
use FireflyIII\Enums\ClauseType;
|
||||
|
||||
return [
|
||||
ClauseType::TRANSACTION => [
|
||||
ClauseType::WHERE => [
|
||||
ClauseType::TRANSACTION->value => [
|
||||
ClauseType::WHERE->value => [
|
||||
'account_id' => 'required|numeric|belongsToUser:accounts,id',
|
||||
],
|
||||
ClauseType::UPDATE => [
|
||||
ClauseType::UPDATE->value => [
|
||||
'account_id' => 'required|numeric|belongsToUser:accounts,id',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -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-20',
|
||||
'build_time' => 1771605484,
|
||||
'version' => 'develop/2026-02-21',
|
||||
'build_time' => 1771652199,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -3779,9 +3779,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
|
||||
"integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -7153,9 +7153,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "25.8.12",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-25.8.12.tgz",
|
||||
"integrity": "sha512-hw59RF5QaH9i3l47hTXjeLLtzgVO8OtznlTJZbulmaLbz+itA1hIKWHTEiajY9W2SNPzvL8U5nTBVt7SsOGNRA==",
|
||||
"version": "25.8.13",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-25.8.13.tgz",
|
||||
"integrity": "sha512-E0vzjBY1yM+nsFrtgkjLhST2NBkirkvOVoQa0MSldhsuZ3jUge7ZNpuwG0Cfc74zwo5ZwRzg3uOgT+McBn32iA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
||||
@@ -16,7 +16,10 @@ The different alpha and beta builds will be compiled from their corresponding ta
|
||||
### Minor Release Support Matrix
|
||||
| Version | Supported |
|
||||
|----------------------------------|--------------------|
|
||||
| Firefly III v6.2.x | :white_check_mark: |
|
||||
| Firefly III v6.5.x | :white_check_mark: |
|
||||
| Firefly III v6.4.x | :x: |
|
||||
| Firefly III v6.3.x | :x: |
|
||||
| Firefly III v6.2.x | :x: |
|
||||
| Firefly III v6.1.x | :x: |
|
||||
| Firefly III v6.0.x | :x: |
|
||||
| Firefly III v5.8.x | :x: |
|
||||
|
||||
@@ -331,6 +331,7 @@ return [
|
||||
'update_newer_version_alert' => 'You are running :your_version, which is newer than the latest release, :new_version.',
|
||||
'update_check_error' => 'An error occurred while checking for updates: :error',
|
||||
'unknown_error' => 'Unknown error. Sorry about that.',
|
||||
'no_new_release_available' => 'There is no newer release available. You are up to date.',
|
||||
'disabled_but_check' => 'You disabled update checking. So don\'t forget to check for updates yourself every now and then. Thank you!',
|
||||
'admin_update_channel_title' => 'Update channel',
|
||||
'admin_update_channel_explain' => 'Firefly III has three update "channels" which determine how ahead of the curve you are in terms of features, enhancements and bugs. Use the "beta" channel if you\'re adventurous and the "alpha" when you like to live life dangerously.',
|
||||
|
||||
Reference in New Issue
Block a user