Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
🤖 Auto commit for release 'develop' on 2025-09-07
JC512e8651017fe
diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.phpindex 610b71066a..0b68debfcd 100644--- a/app/Api/V1/Controllers/Controller.php+++ b/app/Api/V1/Controllers/Controller.php@@ -27,7 +27,6 @@ namespace FireflyIII\Api\V1\Controllers;use Carbon\Carbon;use Carbon\Exceptions\InvalidFormatException;use FireflyIII\Exceptions\BadHttpHeaderException;-use FireflyIII\Models\Preference;use FireflyIII\Models\TransactionCurrency;use FireflyIII\Support\Facades\Amount;use FireflyIII\Support\Facades\Steam;diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.phpindex 8df3e33f47..9b7c7fea0d 100644--- a/app/Handlers/Events/UserEventHandler.php+++ b/app/Handlers/Events/UserEventHandler.php@@ -129,7 +129,7 @@ class UserEventHandler$groupTitle = $user->email;$index = 1;- /** @var UserGroup|null $group */+ /** @var null|UserGroup $group */$group = null;// create a new group.diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex 2575cf0084..b63ab5d86b 100644--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -412,7 +412,7 @@ class ProfileController extends Controller// found user.which email address to return to?$set = app('preferences')->beginsWith($user, 'previous_email_');- /** @var string|null $match */+ /** @var null|string $match */$match = null;foreach ($set as $entry) {$hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $entry->data));diff --git a/app/Repositories/UserGroup/UserGroupRepository.php b/app/Repositories/UserGroup/UserGroupRepository.phpindex 0ed1921890..3f9bcdace1 100644--- a/app/Repositories/UserGroup/UserGroupRepository.php+++ b/app/Repositories/UserGroup/UserGroupRepository.php@@ -53,7 +53,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte/** @var GroupMembership $membership */foreach ($memberships as $membership) {/** @var null|User $user */- $user = $membership->user()->first();+ $user = $membership->user()->first();if (null === $user) {continue;}@@ -82,8 +82,8 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte// all users are now moved away from user group.// time to DESTROY all objects.// we have to do this one by one to trigger the necessary observers :(- $objects = ['availableBudgets', 'bills', 'budgets', 'categories', 'currencyExchangeRates', 'objectGroups',- 'recurrences', 'rules', 'ruleGroups', 'tags', 'transactionGroups', 'transactionJournals', 'piggyBanks', 'accounts', 'webhooks',+ $objects = ['availableBudgets', 'bills', 'budgets', 'categories', 'currencyExchangeRates', 'objectGroups',+ 'recurrences', 'rules', 'ruleGroups', 'tags', 'transactionGroups', 'transactionJournals', 'piggyBanks', 'accounts', 'webhooks',];foreach ($objects as $object) {foreach ($userGroup->{$object}()->get() as $item) { // @phpstan-ignore-line@@ -110,7 +110,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte/** @var null|UserGroup $group */$group = $membership->userGroup()->first();if (null !== $group) {- $groupId = $group->id;+ $groupId = $group->id;if (in_array($groupId, array_keys($set), true)) {continue;}@@ -135,12 +135,12 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupIntewhile ($exists && $loop < 10) {$existingGroup = $this->findByName($groupName);if (!$existingGroup instanceof UserGroup) {- $exists = false;+ $exists = false;/** @var UserGroup $existingGroup */$existingGroup = $this->store(['user' => $user, 'title' => $groupName]);}- $groupName = sprintf('%s-%s', $user->email, substr(sha1(random_int(1000, 9999) . microtime()), 0, 4));+ $groupName = sprintf('%s-%s', $user->email, substr(sha1(random_int(1000, 9999).microtime()), 0, 4));++$loop;}@@ -160,7 +160,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte$data['user'] = $this->user;/** @var UserGroupFactory $factory */- $factory = app(UserGroupFactory::class);+ $factory = app(UserGroupFactory::class);return $factory->create($data);}@@ -191,10 +191,10 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte{$userGroup->title = $data['title'];$userGroup->save();- $currency = null;+ $currency = null;/** @var CurrencyRepositoryInterface $repository */- $repository = app(CurrencyRepositoryInterface::class);+ $repository = app(CurrencyRepositoryInterface::class);if (array_key_exists('primary_currency_code', $data)) {$repository->setUser($this->user);@@ -220,11 +220,11 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte*/public function updateMembership(UserGroup $userGroup, array $data): UserGroup{- $owner = UserRole::whereTitle(UserRoleEnum::OWNER)->first();+ $owner = UserRole::whereTitle(UserRoleEnum::OWNER)->first();app('log')->debug('in update membership');/** @var null|User $user */- $user = null;+ $user = null;if (array_key_exists('id', $data)) {/** @var null|User $user */$user = User::find($data['id']);@@ -263,8 +263,9 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInteif ($membershipCount > 1) {// group has multiple members. How many are owner, except the user we're editing now?$ownerCount = $userGroup->groupMemberships()- ->where('user_role_id', $owner->id)- ->where('user_id', '!=', $user->id)->count();+ ->where('user_role_id', $owner->id)+ ->where('user_id', '!=', $user->id)->count()+ ;// if there are no other owners and the current users does not get or keep the owner role, refuse.if (0 === $ownerCountdiff --git a/app/Support/Form/FormSupport.php b/app/Support/Form/FormSupport.phpindex 38e124954b..4bcc0fcb87 100644--- a/app/Support/Form/FormSupport.php+++ b/app/Support/Form/FormSupport.php@@ -36,7 +36,7 @@ trait FormSupport{public function multiSelect(string $name, ?array $list = null, mixed $selected = null, ?array $options = null): string{- $list ??= [];+ $list ??= [];$label = $this->label($name, $options);$options = $this->expandOptionArray($name, $label, $options);$classes = $this->getHolderClasses($name);@@ -62,7 +62,7 @@ trait FormSupport}$name = str_replace('[]', '', $name);- return (string)trans('form.' . $name);+ return (string)trans('form.'.$name);}/**@@ -70,10 +70,10 @@ trait FormSupport*/protected function expandOptionArray(string $name, $label, ?array $options = null): array{- $options ??= [];+ $options ??= [];$name = str_replace('[]', '', $name);$options['class'] = 'form-control';- $options['id'] = 'ffInput_' . $name;+ $options['id'] = 'ffInput_'.$name;$options['autocomplete'] = 'off';$options['placeholder'] = ucfirst((string)$label);@@ -121,7 +121,7 @@ trait FormSupport*/public function select(string $name, ?array $list = null, $selected = null, ?array $options = null): string{- $list ??= [];+ $list ??= [];$label = $this->label($name, $options);$options = $this->expandOptionArray($name, $label, $options);$classes = $this->getHolderClasses($name);diff --git a/app/Support/Http/Api/CleansChartData.php b/app/Support/Http/Api/CleansChartData.phpindex a3d54974cf..aef2ec443f 100644--- a/app/Support/Http/Api/CleansChartData.php+++ b/app/Support/Http/Api/CleansChartData.php@@ -43,7 +43,7 @@ trait CleansChartData$return = [];/**- * @var int $index+ * @var int $index* @var array $array*/foreach ($data as $index => $array) {diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.phpindex cdb4e0db6b..c90541b081 100644--- a/app/Support/Request/ConvertsDataTypes.php+++ b/app/Support/Request/ConvertsDataTypes.php@@ -103,7 +103,7 @@ trait ConvertsDataTypes{// assume this all works, because the validator would have caught any errors.$parameter = (string)request()->query->get($field);- if('' === $parameter) {+ if ('' === $parameter) {return [];}$parts = explode(',', $parameter);diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.phpindex e24bfbb364..86d33e8c83 100644--- a/app/Support/Twig/General.php+++ b/app/Support/Twig/General.php@@ -184,11 +184,11 @@ class General extends AbstractExtensionstatic function (string $string): string {$proto = parse_url($string, PHP_URL_SCHEME);$host = parse_url($string, PHP_URL_HOST);- if(is_array($host)) {- $host = join(' ', $host);+ if (is_array($host)) {+ $host = implode(' ', $host);}- if(is_array($proto)) {- $proto = join(' ', $proto);+ if (is_array($proto)) {+ $proto = implode(' ', $proto);}return e(sprintf('%s://%s', $proto, $host));diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.phpindex f7c45920b9..14096c5306 100644--- a/app/Transformers/PiggyBankTransformer.php+++ b/app/Transformers/PiggyBankTransformer.php@@ -107,6 +107,4 @@ class PiggyBankTransformer extends AbstractTransformer],];}--}diff --git a/app/Transformers/WebhookTransformer.php b/app/Transformers/WebhookTransformer.phpindex 89ad612160..d402cd7852 100644--- a/app/Transformers/WebhookTransformer.php+++ b/app/Transformers/WebhookTransformer.php@@ -24,9 +24,6 @@ declare(strict_types=1);namespace FireflyIII\Transformers;-use FireflyIII\Enums\WebhookDelivery;-use FireflyIII\Enums\WebhookResponse;-use FireflyIII\Enums\WebhookTrigger;use FireflyIII\Models\Webhook;/**diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.phpindex 485a0cef73..bb9bbd3198 100644--- a/app/Validation/FireflyValidator.php+++ b/app/Validation/FireflyValidator.php@@ -207,7 +207,7 @@ class FireflyValidator extends Validator$value = strtoupper($value);// replace characters outside of ASCI range.- $value = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);+ $value = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);$search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];$replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'];diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.phpindex 44e2f857d7..944b9372d2 100644--- a/app/Validation/TransactionValidation.php+++ b/app/Validation/TransactionValidation.php@@ -296,7 +296,7 @@ trait TransactionValidationreturn true;}- return $this->isAsset($account);+ return $this->isAsset($account);}private function isLiability(Account $account): booldiff --git a/config/firefly.php b/config/firefly.phpindex 94c59b3a48..0c34b00b4b 100644--- a/config/firefly.php+++ b/config/firefly.php@@ -79,7 +79,7 @@ return [// see cer.php for exchange rates feature flag.],'version' => 'develop/2025-09-07',- 'build_time' => 1757224461,+ 'build_time' => 1757235733,'api_version' => '2.1.0', // field is no longer used.'db_version' => 26,diff --git a/config/mail.php b/config/mail.phpindex c0bc8c5adb..771a214c62 100644--- a/config/mail.php+++ b/config/mail.php@@ -22,6 +22,7 @@declare(strict_types=1);use function Safe\parse_url;+return [/*|--------------------------------------------------------------------------diff --git a/config/view.php b/config/view.phpindex fdf9b39a56..a0eb9aa3b8 100644--- a/config/view.php+++ b/config/view.php@@ -22,6 +22,7 @@declare(strict_types=1);use function Safe\realpath;+$paths = [realpath(base_path('resources/views'))];if ('v2' === env('FIREFLY_III_LAYOUT')) {$paths = [diff --git a/routes/api.php b/routes/api.phpindex 79f5802b74..0269b5382b 100644--- a/routes/api.php+++ b/routes/api.php@@ -21,9 +21,10 @@*/declare(strict_types=1);-use function Safe\define;use Illuminate\Support\Facades\Route;+use function Safe\define;+/** ____ ____ __ .______ ______ __ __ .___________. _______ _______.* \ \ / / /_ | | _ \ / __ \ | | | | | || ____| / |diff --git a/routes/web.php b/routes/web.phpindex a5efe1d500..4d86235d14 100644--- a/routes/web.php+++ b/routes/web.php@@ -22,6 +22,7 @@declare(strict_types=1);use Illuminate\Support\Facades\Route;+use function Safe\define;if (!defined('DATEFORMAT')) {