Compare commits

...

151 Commits

Author SHA1 Message Date
James Cole
92a535c644 Only update amount when it's actually changed. 2025-12-20 20:12:07 +01:00
James Cole
340540bd5a Replace calls to Amount facade. 2025-12-20 08:21:05 +01:00
James Cole
c63f4a941b Expand debug info for currency search. 2025-12-20 08:08:57 +01:00
James Cole
7491cb5f58 Merge branches 'develop' and 'develop' of github.com:firefly-iii/firefly-iii into develop 2025-12-20 08:08:30 +01:00
James Cole
31c1e28c76 Add message. 2025-12-20 08:08:20 +01:00
github-actions[bot]
0ece35feca Merge pull request #11393 from firefly-iii/release-1766210807
🤖 Automatically merge the PR into the develop branch.
2025-12-20 07:06:54 +01:00
JC5
3b8caba37c 🤖 Auto commit for release 'develop' on 2025-12-20 2025-12-20 07:06:47 +01:00
James Cole
8e729d6bbf Replace references to hard coded config with variables. 2025-12-20 07:00:53 +01:00
James Cole
0f0cdb8e96 Replace config calls. 2025-12-20 06:42:11 +01:00
James Cole
b0cc5f3a46 Remove entries from .env file. 2025-12-20 06:39:58 +01:00
James Cole
71c5bdb198 Move settings to the settings page, out of the .env file. 2025-12-20 06:39:05 +01:00
James Cole
be9078fe99 Remove unused settings. 2025-12-20 06:10:51 +01:00
github-actions[bot]
d235e32c34 Merge pull request #11391 from firefly-iii/release-1766164682
🤖 Automatically merge the PR into the develop branch.
2025-12-19 18:18:09 +01:00
JC5
e34b89da08 🤖 Auto commit for release 'develop' on 2025-12-19 2025-12-19 18:18:02 +01:00
James Cole
f5428595d5 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
# Conflicts:
#	app/Console/Commands/Correction/CorrectsAmounts.php
2025-12-19 18:13:58 +01:00
James Cole
87cb1e1a2b Fix #11378 2025-12-19 18:13:04 +01:00
github-actions[bot]
22448a825b Merge pull request #11390 from firefly-iii/release-1766158480
🤖 Automatically merge the PR into the develop branch.
2025-12-19 16:34:48 +01:00
JC5
476a9ac6e4 🤖 Auto commit for release 'develop' on 2025-12-19 2025-12-19 16:34:41 +01:00
James Cole
0acd07405b Fix #11388 2025-12-19 16:30:39 +01:00
James Cole
1daacb80b1 Fix #11383 2025-12-17 19:27:59 +01:00
github-actions[bot]
2bf841627a Merge pull request #11382 from firefly-iii/release-1765957651
🤖 Automatically merge the PR into the develop branch.
2025-12-17 08:47:38 +01:00
JC5
012df6bb24 🤖 Auto commit for release 'develop' on 2025-12-17 2025-12-17 08:47:31 +01:00
Sander Dorigo
486e0d5ed5 Update reference to Steam 2025-12-17 08:43:39 +01:00
James Cole
e8fe9db181 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop 2025-12-17 06:04:23 +01:00
James Cole
05f0cb26f8 Remove sentry. 2025-12-17 06:04:17 +01:00
github-actions[bot]
bdaed65207 Merge pull request #11375 from firefly-iii/release-1765863733
🤖 Automatically merge the PR into the develop branch.
2025-12-16 06:42:20 +01:00
JC5
62a9195acc 🤖 Auto commit for release 'v6.4.14' on 2025-12-16 2025-12-16 06:42:13 +01:00
James Cole
40d1e36ba8 Fix changelog. 2025-12-16 06:38:14 +01:00
James Cole
61a8525d26 Merge branch 'main' into develop 2025-12-16 06:36:32 +01:00
James Cole
ef01fbe5f4 Update changelog. 2025-12-16 06:36:17 +01:00
James Cole
9413f49c84 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop 2025-12-16 06:36:12 +01:00
github-actions[bot]
d9ae99b5fe Merge pull request #11374 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-12-16 06:35:19 +01:00
github-actions[bot]
45d2d86bba Merge pull request #11373 from firefly-iii/release-1765863308
🤖 Automatically merge the PR into the develop branch.
2025-12-16 06:35:15 +01:00
JC5
e21d5e5d01 🤖 Auto commit for release 'v6.4.13' on 2025-12-16 2025-12-16 06:35:08 +01:00
James Cole
8781e2a870 Fix #11368 2025-12-16 06:31:19 +01:00
github-actions[bot]
9e4bfd9d1a Merge pull request #11372 from firefly-iii/release-1765862987
🤖 Automatically merge the PR into the develop branch.
2025-12-16 06:29:55 +01:00
JC5
d61d6aa2e2 🤖 Auto commit for release 'develop' on 2025-12-16 2025-12-16 06:29:47 +01:00
github-actions[bot]
230a3a0180 Merge pull request #11371 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-12-16 06:25:04 +01:00
github-actions[bot]
002454b995 Merge pull request #11370 from firefly-iii/release-1765862692
🤖 Automatically merge the PR into the develop branch.
2025-12-16 06:24:59 +01:00
JC5
e6d9c2e218 🤖 Auto commit for release 'v6.4.12' on 2025-12-16 2025-12-16 06:24:52 +01:00
github-actions[bot]
eaa5054b00 Merge pull request #11369 from firefly-iii/release-1765861996
🤖 Automatically merge the PR into the develop branch.
2025-12-16 06:13:25 +01:00
JC5
4e9e63ed08 🤖 Auto commit for release 'develop' on 2025-12-16 2025-12-16 06:13:16 +01:00
James Cole
76ea5b6e34 Fix #11367 2025-12-16 06:08:38 +01:00
Sander Dorigo
2f788f7397 Merge branch 'develop' of https://github.com/firefly-iii/firefly-iii into develop 2025-12-15 15:51:13 +01:00
Sander Dorigo
29766aa9b7 Add better running balance 2025-12-15 14:56:58 +01:00
github-actions[bot]
cc30376297 Merge pull request #11364 from firefly-iii/release-1765805210
🤖 Automatically merge the PR into the develop branch.
2025-12-15 14:26:58 +01:00
JC5
5b007fbe01 🤖 Auto commit for release 'develop' on 2025-12-15 2025-12-15 14:26:50 +01:00
Sander Dorigo
e1f8ea3b1a Fix missing user property 2025-12-15 14:19:43 +01:00
James Cole
6f019f0bb4 Merge pull request #11363 from firefly-iii/main
Merge main into develop
2025-12-15 10:48:19 +01:00
github-actions[bot]
f475947776 Merge pull request #11362 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-12-15 09:01:26 +01:00
github-actions[bot]
ee6901eb92 Merge pull request #11361 from firefly-iii/release-1765785673
🤖 Automatically merge the PR into the develop branch.
2025-12-15 09:01:21 +01:00
JC5
84d7523d6c 🤖 Auto commit for release 'v6.4.11' on 2025-12-15 2025-12-15 09:01:13 +01:00
github-actions[bot]
6900dc7dae Merge pull request #11360 from firefly-iii/release-1765785184
🤖 Automatically merge the PR into the develop branch.
2025-12-15 08:53:14 +01:00
JC5
6247e516c6 🤖 Auto commit for release 'develop' on 2025-12-15 2025-12-15 08:53:05 +01:00
Sander Dorigo
cdf970a88c Add changelog 2025-12-15 08:42:10 +01:00
Sander Dorigo
a447c387f9 Fix #11357 2025-12-15 08:41:07 +01:00
Sander Dorigo
ce2c94efed Fix #11356 2025-12-15 08:40:19 +01:00
James Cole
205ea4270b Merge pull request #11358 from firefly-iii/dependabot/github_actions/dessant/label-actions-5 2025-12-15 07:27:43 +01:00
github-actions[bot]
dcbb2428f2 Merge pull request #11359 from firefly-iii/release-1765769737
🤖 Automatically merge the PR into the develop branch.
2025-12-15 04:35:45 +01:00
JC5
319916fc8f 🤖 Auto commit for release 'develop' on 2025-12-15 2025-12-15 04:35:37 +01:00
dependabot[bot]
088b0e2f30 Bump dessant/label-actions from 4 to 5
Bumps [dessant/label-actions](https://github.com/dessant/label-actions) from 4 to 5.
- [Release notes](https://github.com/dessant/label-actions/releases)
- [Changelog](https://github.com/dessant/label-actions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dessant/label-actions/compare/v4...v5)

---
updated-dependencies:
- dependency-name: dessant/label-actions
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 03:06:09 +00:00
github-actions[bot]
b45aadf8a3 Merge pull request #11355 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-12-14 19:13:25 +01:00
github-actions[bot]
1fafeb1515 Merge pull request #11354 from firefly-iii/release-1765735989
🤖 Automatically merge the PR into the develop branch.
2025-12-14 19:13:19 +01:00
JC5
f60c64c9c1 🤖 Auto commit for release 'v6.4.10' on 2025-12-14 2025-12-14 19:13:09 +01:00
James Cole
564dcb1c6d Expand changelog. 2025-12-14 19:09:08 +01:00
github-actions[bot]
4044bb85a9 Merge pull request #11353 from firefly-iii/release-1765725243
🤖 Automatically merge the PR into the develop branch.
2025-12-14 16:14:10 +01:00
JC5
18bb0eecff 🤖 Auto commit for release 'develop' on 2025-12-14 2025-12-14 16:14:03 +01:00
James Cole
9af95907e3 Fix patch etc. 2025-12-14 16:10:21 +01:00
James Cole
40ecba4b5a No longer need patch. 2025-12-14 10:31:35 +01:00
James Cole
73312a4ccc Fix #11310 2025-12-14 10:24:27 +01:00
James Cole
d747ac237b Validate title, fix running balance display 2025-12-13 06:36:20 +01:00
github-actions[bot]
b6c4253d76 Merge pull request #11349 from firefly-iii/release-1765602800
🤖 Automatically merge the PR into the develop branch.
2025-12-13 06:13:28 +01:00
JC5
d74d67633d 🤖 Auto commit for release 'develop' on 2025-12-13 2025-12-13 06:13:20 +01:00
James Cole
0b00f35101 Update packages, another fix for the same issue. 2025-12-13 06:08:58 +01:00
James Cole
8f81cb8cc4 Fix #11346 2025-12-13 06:05:39 +01:00
github-actions[bot]
fa665286b5 Merge pull request #11344 from firefly-iii/release-1765164810
🤖 Automatically merge the PR into the develop branch.
2025-12-08 04:33:39 +01:00
JC5
58ae0c1c9b 🤖 Auto commit for release 'develop' on 2025-12-08 2025-12-08 04:33:30 +01:00
github-actions[bot]
7eab4834c8 Merge pull request #11340 from firefly-iii/release-1765124558
🤖 Automatically merge the PR into the develop branch.
2025-12-07 17:22:47 +01:00
JC5
d1332eb592 🤖 Auto commit for release 'develop' on 2025-12-07 2025-12-07 17:22:38 +01:00
James Cole
346f2dfaea Add amount event. 2025-12-07 16:47:04 +01:00
James Cole
f6037318f4 Fix #11337 2025-12-07 07:00:50 +01:00
James Cole
babf9fe96f Add file permissions checks. #11323 2025-12-06 14:55:15 +01:00
James Cole
ca3922d00a Fix #11313 2025-12-06 13:50:51 +01:00
James Cole
aadb685b57 Add YTD fix. 2025-12-06 08:12:18 +01:00
github-actions[bot]
bee62b2115 Merge pull request #11335 from firefly-iii/release-1765004138
🤖 Automatically merge the PR into the develop branch.
2025-12-06 07:55:46 +01:00
JC5
205169a8ad 🤖 Auto commit for release 'develop' on 2025-12-06 2025-12-06 07:55:38 +01:00
James Cole
5f36bb84a4 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop 2025-12-06 07:51:19 +01:00
James Cole
5b395d870b Fix #11333 2025-12-06 07:32:43 +01:00
github-actions[bot]
bceb526cb3 Merge pull request #11334 from firefly-iii/release-1765002701
🤖 Automatically merge the PR into the develop branch.
2025-12-06 07:31:52 +01:00
JC5
1f89dddb08 🤖 Auto commit for release 'develop' on 2025-12-06 2025-12-06 07:31:41 +01:00
James Cole
a93f2d66af Fix #11329 2025-12-06 07:27:41 +01:00
James Cole
551909ea60 Merge branch 'main' into develop 2025-12-05 08:21:34 +01:00
Sander Dorigo
5667044349 Fix #11328 2025-12-04 17:27:20 +01:00
James Cole
6f73e4f2c9 Merge pull request #11316 from firefly-iii/dependabot/composer/develop/symfony/mailgun-mailer-8.0.0
Bump symfony/mailgun-mailer from 7.4.0 to 8.0.0
2025-12-01 14:32:55 +01:00
dependabot[bot]
1f19f20734 Bump symfony/mailgun-mailer from 7.4.0 to 8.0.0
Bumps [symfony/mailgun-mailer](https://github.com/symfony/mailgun-mailer) from 7.4.0 to 8.0.0.
- [Release notes](https://github.com/symfony/mailgun-mailer/releases)
- [Changelog](https://github.com/symfony/mailgun-mailer/blob/7.3/CHANGELOG.md)
- [Commits](https://github.com/symfony/mailgun-mailer/compare/v7.4.0...v8.0.0)

---
updated-dependencies:
- dependency-name: symfony/mailgun-mailer
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 10:45:09 +00:00
James Cole
91c8f0db80 Merge pull request #11317 from firefly-iii/dependabot/composer/develop/symfony/expression-language-8.0.0
Bump symfony/expression-language from 7.4.0 to 8.0.0
2025-12-01 11:41:22 +01:00
dependabot[bot]
2cdd1aa147 Bump symfony/expression-language from 7.4.0 to 8.0.0
Bumps [symfony/expression-language](https://github.com/symfony/expression-language) from 7.4.0 to 8.0.0.
- [Release notes](https://github.com/symfony/expression-language/releases)
- [Changelog](https://github.com/symfony/expression-language/blob/7.3/CHANGELOG.md)
- [Commits](https://github.com/symfony/expression-language/compare/v7.4.0...v8.0.0)

---
updated-dependencies:
- dependency-name: symfony/expression-language
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 08:17:15 +00:00
James Cole
5ac51218aa Merge pull request #11319 from firefly-iii/dependabot/github_actions/github/command-2.0.3 2025-12-01 05:15:37 +01:00
James Cole
80abd277a0 Merge pull request #11315 from firefly-iii/dependabot/composer/develop/symfony/http-client-8.0.0 2025-12-01 05:14:44 +01:00
mergify[bot]
b644f28882 Merge branch 'develop' into dependabot/composer/develop/symfony/http-client-8.0.0 2025-12-01 03:40:11 +00:00
github-actions[bot]
35a81fd2de Merge pull request #11321 from firefly-iii/release-1764560258
🤖 Automatically merge the PR into the develop branch.
2025-12-01 04:37:44 +01:00
JC5
51e8a1dbe2 🤖 Auto commit for release 'develop' on 2025-12-01 2025-12-01 04:37:38 +01:00
dependabot[bot]
b799379a0a Bump github/command from 2.0.2 to 2.0.3
Bumps [github/command](https://github.com/github/command) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/github/command/releases)
- [Commits](https://github.com/github/command/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: github/command
  dependency-version: 2.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:10:25 +00:00
dependabot[bot]
c8edaee848 Bump symfony/http-client from 7.4.0 to 8.0.0
Bumps [symfony/http-client](https://github.com/symfony/http-client) from 7.4.0 to 8.0.0.
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/7.3/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-client/compare/v7.4.0...v8.0.0)

---
updated-dependencies:
- dependency-name: symfony/http-client
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:03:40 +00:00
github-actions[bot]
bbe47635d3 Merge pull request #11304 from firefly-iii/release-1764397418
🤖 Automatically merge the PR into the develop branch.
2025-11-29 07:23:46 +01:00
JC5
5c73d238a0 🤖 Auto commit for release 'develop' on 2025-11-29 2025-11-29 07:23:38 +01:00
github-actions[bot]
2bee3d2728 Merge pull request #11301 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-11-28 21:36:11 +01:00
github-actions[bot]
73126786b0 Merge pull request #11300 from firefly-iii/release-1764362158
🤖 Automatically merge the PR into the develop branch.
2025-11-28 21:36:05 +01:00
JC5
962a729025 🤖 Auto commit for release 'v6.4.9' on 2025-11-28 2025-11-28 21:35:58 +01:00
github-actions[bot]
f262cb3947 Merge pull request #11298 from firefly-iii/release-1764353294
🤖 Automatically merge the PR into the develop branch.
2025-11-28 19:08:24 +01:00
JC5
212d579c4f 🤖 Auto commit for release 'develop' on 2025-11-28 2025-11-28 19:08:14 +01:00
James Cole
30937610eb Update changelog. 2025-11-28 19:02:50 +01:00
James Cole
3558bf7647 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop 2025-11-28 19:01:21 +01:00
James Cole
3711222f9e Fix #11281 and some other stuff. 2025-11-28 19:01:15 +01:00
github-actions[bot]
76899389b8 Merge pull request #11291 from firefly-iii/release-1764180754
🤖 Automatically merge the PR into the develop branch.
2025-11-26 19:12:42 +01:00
JC5
e83fe023d2 🤖 Auto commit for release 'develop' on 2025-11-26 2025-11-26 19:12:34 +01:00
James Cole
1dd098a283 Fix #11284 2025-11-26 19:06:58 +01:00
James Cole
52164689d4 Switch to 1M when it's MTD. 2025-11-26 19:05:46 +01:00
github-actions[bot]
034b14eb0b Merge pull request #11290 from firefly-iii/release-1764179030
🤖 Automatically merge the PR into the develop branch.
2025-11-26 18:43:56 +01:00
JC5
8722d264dc 🤖 Auto commit for release 'develop' on 2025-11-26 2025-11-26 18:43:50 +01:00
James Cole
3603ef1cc7 Fix #11288 2025-11-26 18:39:05 +01:00
James Cole
7abd30f4dd Attempted fix with sanity check for #11284 2025-11-26 18:35:56 +01:00
github-actions[bot]
3c904c9017 Merge pull request #11286 from firefly-iii/release-1764136451
🤖 Automatically merge the PR into the develop branch.
2025-11-26 06:54:20 +01:00
JC5
d8bdbf2842 🤖 Auto commit for release 'develop' on 2025-11-26 2025-11-26 06:54:11 +01:00
James Cole
d08966d141 Add new correction command. 2025-11-26 06:50:29 +01:00
James Cole
bd71095e40 Merge branch 'main' into develop 2025-11-25 20:13:04 +01:00
James Cole
d7967a81e3 Fix https://github.com/firefly-iii/firefly-iii/issues/11284 2025-11-25 20:12:35 +01:00
James Cole
fa018e80c0 Replace classes 2025-11-25 20:12:23 +01:00
James Cole
eb4b9659cf Merge pull request #11278 from firefly-iii/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-11-24 08:49:23 +01:00
github-actions[bot]
7b7b9118cd Merge pull request #11279 from firefly-iii/release-1763955257
🤖 Automatically merge the PR into the develop branch.
2025-11-24 04:34:26 +01:00
JC5
373e5c3733 🤖 Auto commit for release 'develop' on 2025-11-24 2025-11-24 04:34:17 +01:00
dependabot[bot]
4e0b1bf65d Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:17:24 +00:00
James Cole
521a496c17 Fix #11267 2025-11-23 21:03:53 +01:00
James Cole
5fea35d5b1 Allow command to be forced. 2025-11-23 08:44:01 +01:00
James Cole
21a6892601 Fix #11265 2025-11-23 06:55:54 +01:00
James Cole
3f386b9003 Fix #11191 2025-11-19 06:26:40 +01:00
github-actions[bot]
72fb534eb4 Merge pull request #11249 from firefly-iii/release-1763402892
🤖 Automatically merge the PR into the develop branch.
2025-11-17 19:08:20 +01:00
JC5
69b46af245 🤖 Auto commit for release 'develop' on 2025-11-17 2025-11-17 19:08:12 +01:00
James Cole
4a901a1b42 Add a bunch of debug #11247 2025-11-17 19:01:38 +01:00
James Cole
a8fffc25c0 Merge pull request #11241 from firefly-iii/dependabot/composer/develop/bacon/bacon-qr-code-3.0.2
Bump bacon/bacon-qr-code from 3.0.1 to 3.0.2
2025-11-17 06:48:36 +01:00
mergify[bot]
d0dab136b1 Merge branch 'develop' into dependabot/composer/develop/bacon/bacon-qr-code-3.0.2 2025-11-17 05:47:38 +00:00
James Cole
91184489da Merge pull request #11242 from firefly-iii/dependabot/npm_and_yarn/develop/alpinejs-3.15.2
Bump alpinejs from 3.15.1 to 3.15.2
2025-11-17 06:46:55 +01:00
mergify[bot]
e4e6cc71c3 Merge branch 'develop' into dependabot/composer/develop/bacon/bacon-qr-code-3.0.2 2025-11-17 03:30:51 +00:00
mergify[bot]
33d637e618 Merge branch 'develop' into dependabot/npm_and_yarn/develop/alpinejs-3.15.2 2025-11-17 03:30:49 +00:00
github-actions[bot]
42eb4410f8 Merge pull request #11243 from firefly-iii/release-1763350179
🤖 Automatically merge the PR into the develop branch.
2025-11-17 04:29:45 +01:00
JC5
5f6b345c79 🤖 Auto commit for release 'develop' on 2025-11-17 2025-11-17 04:29:39 +01:00
dependabot[bot]
30b48a479c Bump alpinejs from 3.15.1 to 3.15.2
Bumps [alpinejs](https://github.com/alpinejs/alpine/tree/HEAD/packages/alpinejs) from 3.15.1 to 3.15.2.
- [Release notes](https://github.com/alpinejs/alpine/releases)
- [Commits](https://github.com/alpinejs/alpine/commits/v3.15.2/packages/alpinejs)

---
updated-dependencies:
- dependency-name: alpinejs
  dependency-version: 3.15.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:01:12 +00:00
dependabot[bot]
55d23af802 Bump bacon/bacon-qr-code from 3.0.1 to 3.0.2
Bumps [bacon/bacon-qr-code](https://github.com/Bacon/BaconQrCode) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/Bacon/BaconQrCode/releases)
- [Changelog](https://github.com/Bacon/BaconQrCode/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Bacon/BaconQrCode/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: bacon/bacon-qr-code
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:00:53 +00:00
James Cole
34bfeba63a Fix #11211 2025-11-13 20:32:02 +01:00
github-actions[bot]
761c20b670 Merge pull request #11234 from firefly-iii/release-1763009724
🤖 Automatically merge the PR into the develop branch.
2025-11-13 05:55:30 +01:00
JC5
d756977ee0 🤖 Auto commit for release 'develop' on 2025-11-13 2025-11-13 05:55:24 +01:00
284 changed files with 3211 additions and 2694 deletions

View File

@@ -402,16 +402,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.89.2", "version": "v3.92.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "7569658f91e475ec93b99bd5964b059ad1336dcf" "reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7569658f91e475ec93b99bd5964b059ad1336dcf", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
"reference": "7569658f91e475ec93b99bd5964b059ad1336dcf", "reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -429,17 +429,17 @@
"react/socket": "^1.16", "react/socket": "^1.16",
"react/stream": "^1.4", "react/stream": "^1.4",
"sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0",
"symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0",
"symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0",
"symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0",
"symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0",
"symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0",
"symfony/polyfill-mbstring": "^1.33", "symfony/polyfill-mbstring": "^1.33",
"symfony/polyfill-php80": "^1.33", "symfony/polyfill-php80": "^1.33",
"symfony/polyfill-php81": "^1.33", "symfony/polyfill-php81": "^1.33",
"symfony/polyfill-php84": "^1.33", "symfony/polyfill-php84": "^1.33",
"symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0",
"symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0"
}, },
"require-dev": { "require-dev": {
"facile-it/paraunit": "^1.3.1 || ^2.7", "facile-it/paraunit": "^1.3.1 || ^2.7",
@@ -451,8 +451,9 @@
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6",
"phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34",
"symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", "symfony/polyfill-php85": "^1.33",
"symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0",
"symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0"
}, },
"suggest": { "suggest": {
"ext-dom": "For handling output formats in XML", "ext-dom": "For handling output formats in XML",
@@ -467,7 +468,7 @@
"PhpCsFixer\\": "src/" "PhpCsFixer\\": "src/"
}, },
"exclude-from-classmap": [ "exclude-from-classmap": [
"src/Fixer/Internal/*" "src/**/Internal/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -493,7 +494,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.2" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.3"
}, },
"funding": [ "funding": [
{ {
@@ -501,7 +502,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-11-06T21:12:50+00:00" "time": "2025-12-18T10:45:02+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
@@ -805,16 +806,16 @@
}, },
{ {
"name": "react/dns", "name": "react/dns",
"version": "v1.13.0", "version": "v1.14.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/dns.git", "url": "https://github.com/reactphp/dns.git",
"reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3",
"reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -869,7 +870,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/reactphp/dns/issues", "issues": "https://github.com/reactphp/dns/issues",
"source": "https://github.com/reactphp/dns/tree/v1.13.0" "source": "https://github.com/reactphp/dns/tree/v1.14.0"
}, },
"funding": [ "funding": [
{ {
@@ -877,20 +878,20 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2024-06-13T14:18:03+00:00" "time": "2025-11-18T19:34:28+00:00"
}, },
{ {
"name": "react/event-loop", "name": "react/event-loop",
"version": "v1.5.0", "version": "v1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/event-loop.git", "url": "https://github.com/reactphp/event-loop.git",
"reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a",
"reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -941,7 +942,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/reactphp/event-loop/issues", "issues": "https://github.com/reactphp/event-loop/issues",
"source": "https://github.com/reactphp/event-loop/tree/v1.5.0" "source": "https://github.com/reactphp/event-loop/tree/v1.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -949,7 +950,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2023-11-13T13:48:05+00:00" "time": "2025-11-17T20:46:25+00:00"
}, },
{ {
"name": "react/promise", "name": "react/promise",
@@ -1026,16 +1027,16 @@
}, },
{ {
"name": "react/socket", "name": "react/socket",
"version": "v1.16.0", "version": "v1.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/socket.git", "url": "https://github.com/reactphp/socket.git",
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08",
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1094,7 +1095,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/reactphp/socket/issues", "issues": "https://github.com/reactphp/socket/issues",
"source": "https://github.com/reactphp/socket/tree/v1.16.0" "source": "https://github.com/reactphp/socket/tree/v1.17.0"
}, },
"funding": [ "funding": [
{ {
@@ -1102,7 +1103,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2024-07-26T10:38:09+00:00" "time": "2025-11-19T20:47:34+00:00"
}, },
{ {
"name": "react/stream", "name": "react/stream",
@@ -1251,47 +1252,39 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v7.3.6", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" "reference": "fcb73f69d655b48fcb894a262f074218df08bd58"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58",
"reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", "reference": "fcb73f69d655b48fcb894a262f074218df08bd58",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/string": "^7.2" "symfony/string": "^7.4|^8.0"
},
"conflict": {
"symfony/dependency-injection": "<6.4",
"symfony/dotenv": "<6.4",
"symfony/event-dispatcher": "<6.4",
"symfony/lock": "<6.4",
"symfony/process": "<6.4"
}, },
"provide": { "provide": {
"psr/log-implementation": "1.0|2.0|3.0" "psr/log-implementation": "1.0|2.0|3.0"
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^6.4|^7.0", "symfony/config": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/event-dispatcher": "^6.4|^7.0", "symfony/event-dispatcher": "^7.4|^8.0",
"symfony/http-foundation": "^6.4|^7.0", "symfony/http-foundation": "^7.4|^8.0",
"symfony/http-kernel": "^6.4|^7.0", "symfony/http-kernel": "^7.4|^8.0",
"symfony/lock": "^6.4|^7.0", "symfony/lock": "^7.4|^8.0",
"symfony/messenger": "^6.4|^7.0", "symfony/messenger": "^7.4|^8.0",
"symfony/process": "^6.4|^7.0", "symfony/process": "^7.4|^8.0",
"symfony/stopwatch": "^6.4|^7.0", "symfony/stopwatch": "^7.4|^8.0",
"symfony/var-dumper": "^6.4|^7.0" "symfony/var-dumper": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1325,7 +1318,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v7.3.6" "source": "https://github.com/symfony/console/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -1345,7 +1338,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-04T01:21:42+00:00" "time": "2025-12-05T15:25:33+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -1416,24 +1409,24 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v7.3.3", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" "reference": "573f95783a2ec6e38752979db139f09fec033f03"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03",
"reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", "reference": "573f95783a2ec6e38752979db139f09fec033f03",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/event-dispatcher-contracts": "^2.5|^3" "symfony/event-dispatcher-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<6.4", "symfony/security-http": "<7.4",
"symfony/service-contracts": "<2.5" "symfony/service-contracts": "<2.5"
}, },
"provide": { "provide": {
@@ -1442,13 +1435,14 @@
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^6.4|^7.0", "symfony/config": "^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.0", "symfony/dependency-injection": "^7.4|^8.0",
"symfony/error-handler": "^6.4|^7.0", "symfony/error-handler": "^7.4|^8.0",
"symfony/expression-language": "^6.4|^7.0", "symfony/expression-language": "^7.4|^8.0",
"symfony/http-foundation": "^6.4|^7.0", "symfony/framework-bundle": "^7.4|^8.0",
"symfony/http-foundation": "^7.4|^8.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^6.4|^7.0" "symfony/stopwatch": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1476,7 +1470,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -1496,7 +1490,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-08-13T11:49:31+00:00" "time": "2025-10-30T14:17:19+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -1576,25 +1570,25 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v7.3.6", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "e9bcfd7837928ab656276fe00464092cc9e1826a" "reference": "d937d400b980523dc9ee946bb69972b5e619058d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/e9bcfd7837928ab656276fe00464092cc9e1826a", "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d",
"reference": "e9bcfd7837928ab656276fe00464092cc9e1826a", "reference": "d937d400b980523dc9ee946bb69972b5e619058d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8" "symfony/polyfill-mbstring": "~1.8"
}, },
"require-dev": { "require-dev": {
"symfony/process": "^6.4|^7.0" "symfony/process": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1622,7 +1616,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v7.3.6" "source": "https://github.com/symfony/filesystem/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -1642,27 +1636,27 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-05T09:52:27+00:00" "time": "2025-12-01T09:13:36+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v7.3.5", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "9f696d2f1e340484b4683f7853b273abff94421f" "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", "url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291",
"reference": "9f696d2f1e340484b4683f7853b273abff94421f", "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2" "php": ">=8.4"
}, },
"require-dev": { "require-dev": {
"symfony/filesystem": "^6.4|^7.0" "symfony/filesystem": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1690,7 +1684,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v7.3.5" "source": "https://github.com/symfony/finder/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -1710,24 +1704,24 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-15T18:45:57+00:00" "time": "2025-11-05T14:36:47+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v7.3.3", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
"reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/deprecation-contracts": "^2.5|^3" "symfony/deprecation-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@@ -1761,7 +1755,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v7.3.3" "source": "https://github.com/symfony/options-resolver/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -1781,7 +1775,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-08-05T10:16:07+00:00" "time": "2025-11-12T15:55:31+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -2364,20 +2358,20 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v7.3.4", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", "url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149",
"reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2" "php": ">=8.4"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2405,7 +2399,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v7.3.4" "source": "https://github.com/symfony/process/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -2425,7 +2419,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-11T10:12:26+00:00" "time": "2025-10-16T16:25:44+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@@ -2516,20 +2510,20 @@
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v7.3.0", "version": "v8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/67df1914c6ccd2d7b52f70d40cf2aea02159d942",
"reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/service-contracts": "^2.5|^3" "symfony/service-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@@ -2558,7 +2552,7 @@
"description": "Provides a way to profile code", "description": "Provides a way to profile code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/stopwatch/tree/v7.3.0" "source": "https://github.com/symfony/stopwatch/tree/v8.0.0"
}, },
"funding": [ "funding": [
{ {
@@ -2569,43 +2563,47 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-24T10:49:57+00:00" "time": "2025-08-04T07:36:47+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v7.3.4", "version": "v8.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "f96476035142921000338bad71e5247fbc138872" "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc",
"reference": "f96476035142921000338bad71e5247fbc138872", "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2", "php": ">=8.4",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-grapheme": "^1.33",
"symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-intl-normalizer": "^1.0",
"symfony/polyfill-mbstring": "~1.0" "symfony/polyfill-mbstring": "^1.0"
}, },
"conflict": { "conflict": {
"symfony/translation-contracts": "<2.5" "symfony/translation-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/emoji": "^7.1", "symfony/emoji": "^7.4|^8.0",
"symfony/http-client": "^6.4|^7.0", "symfony/http-client": "^7.4|^8.0",
"symfony/intl": "^6.4|^7.0", "symfony/intl": "^7.4|^8.0",
"symfony/translation-contracts": "^2.5|^3.0", "symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^6.4|^7.0" "symfony/var-exporter": "^7.4|^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2644,7 +2642,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v7.3.4" "source": "https://github.com/symfony/string/tree/v8.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -2664,7 +2662,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-11T14:36:48+00:00" "time": "2025-12-01T09:13:36+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
@@ -2675,5 +2673,5 @@
"prefer-lowest": false, "prefer-lowest": false,
"platform": {}, "platform": {},
"platform-dev": {}, "platform-dev": {},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.9.0"
} }

View File

@@ -188,39 +188,11 @@ MAILERSEND_API_KEY=
# Firefly III can send you the following messages. # Firefly III can send you the following messages.
SEND_ERROR_MESSAGE=true SEND_ERROR_MESSAGE=true
# These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true
# Set this value to true if you want to set the location of certain things, like transactions.
# Since this involves an external service, it's optional and disabled by default.
ENABLE_EXTERNAL_MAP=false
#
# Enable or disable exchange rate conversion.
#
ENABLE_EXCHANGE_RATES=false
# Set this value to true if you want Firefly III to download currency exchange rates
# from the internet. These rates are hosted by the creator of Firefly III inside
# an Azure Storage Container.
# Not all currencies may be available. Rates may be wrong.
ENABLE_EXTERNAL_RATES=false
# The map will default to this location: # The map will default to this location:
MAP_DEFAULT_LAT=51.983333 MAP_DEFAULT_LAT=51.983333
MAP_DEFAULT_LONG=5.916667 MAP_DEFAULT_LONG=5.916667
MAP_DEFAULT_ZOOM=6 MAP_DEFAULT_ZOOM=6
#
# Some objects have room for an URL, like transactions and webhooks.
# By default, the following protocols are allowed:
# http, https, ftp, ftps, mailto
#
# To change this, set your preferred comma separated set below.
# Be sure to include http, https and other default ones if you need to.
#
VALID_URL_PROTOCOLS=
# #
# Firefly III authentication settings # Firefly III authentication settings
# #
@@ -275,21 +247,6 @@ DISABLE_CSP_HEADER=false
TRACKER_SITE_ID= TRACKER_SITE_ID=
TRACKER_URL= TRACKER_URL=
#
# You can automatically submit errors to the Firefly III developer using sentry.io
#
# This is entirely optional of course. If you run into errors, I will gladly accept GitHub
# issues or a forwared email message.
#
# If you set this to true, your installation will try to contact sentry.io when it runs into errors.
#
REPORT_ERRORS_ONLINE=false
#
# Firefly III supports webhooks. These are security sensitive and must be enabled manually first.
#
ALLOW_WEBHOOKS=false
# #
# The static cron job token can be useful when you use Docker and wish to manage cron jobs. # The static cron job token can be useful when you use Docker and wish to manage cron jobs.
# 1. Set this token to any 32-character value (this is important!). # 1. Set this token to any 32-character value (this is important!).
@@ -323,25 +280,12 @@ PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
#
# Disable or enable the running balance column data.
# If you enable this, please also run "php artisan firefly-iii:correct-database"
# This will take some time the first run.
#
USE_RUNNING_BALANCE=false
# #
# The v2 layout is very experimental. If it breaks you get to keep both parts. # The v2 layout is very experimental. If it breaks you get to keep both parts.
# Be wary of data loss. # Be wary of data loss.
# #
FIREFLY_III_LAYOUT=v1 FIREFLY_III_LAYOUT=v1
#
# Which Query Parser implementation to use for the search engine and rules
# 'new' is experimental, 'legacy' is the classic one
#
QUERY_PARSER_IMPLEMENTATION=new
# #
# Please make sure this URL matches the external URL of your Firefly III installation. # Please make sure this URL matches the external URL of your Firefly III installation.
# It is used to validate specific requests and to generate URLs in emails. # It is used to validate specific requests and to generate URLs in emails.

View File

@@ -13,7 +13,7 @@ jobs:
close_duplicates: close_duplicates:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: github/command@v2.0.2 - uses: github/command@v2.0.3
id: command id: command
with: with:
allowed_contexts: "issue" allowed_contexts: "issue"

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'Checkout repository' - name: 'Checkout repository'
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: 'Dependency review' - name: 'Dependency review'

View File

@@ -18,4 +18,4 @@ jobs:
action: action:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dessant/label-actions@v4 - uses: dessant/label-actions@v5

View File

@@ -29,7 +29,7 @@ jobs:
env: env:
version: ${{ github.event_name == 'schedule' && 'develop' || inputs.version }} version: ${{ github.event_name == 'schedule' && 'develop' || inputs.version }}
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Import GPG key - name: Import GPG key

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Chart; namespace FireflyIII\Api\V1\Controllers\Chart;
use Illuminate\Http\Request;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Chart\ChartRequest; use FireflyIII\Api\V1\Requests\Chart\ChartRequest;
use FireflyIII\Enums\UserRoleEnum; use FireflyIII\Enums\UserRoleEnum;
@@ -32,11 +31,13 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Facades\Navigation;
use FireflyIII\Support\Facades\Steam; use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Http\Api\ApiSupport; use FireflyIII\Support\Http\Api\ApiSupport;
use FireflyIII\Support\Http\Api\CleansChartData; use FireflyIII\Support\Http\Api\CleansChartData;
use FireflyIII\Support\Http\Api\CollectsAccountsFromFilter; use FireflyIII\Support\Http\Api\CollectsAccountsFromFilter;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
/** /**
@@ -103,7 +104,7 @@ class AccountController extends Controller
$currency = $this->repository->getAccountCurrency($account); $currency = $this->repository->getAccountCurrency($account);
$currentStart = clone $params['start']; $currentStart = clone $params['start'];
$range = Steam::finalAccountBalanceInRange($account, $params['start'], clone $params['end'], $this->convertToPrimary); $range = Steam::finalAccountBalanceInRange($account, $params['start'], clone $params['end'], $this->convertToPrimary);
$period = $params['period'] ?? '1D';
$previous = array_values($range)[0]['balance']; $previous = array_values($range)[0]['balance'];
$pcPrevious = null; $pcPrevious = null;
@@ -129,7 +130,7 @@ class AccountController extends Controller
'end_date' => $params['end']->toAtomString(), 'end_date' => $params['end']->toAtomString(),
'type' => 'line', 'type' => 'line',
'yAxisID' => 0, 'yAxisID' => 0,
'period' => '1D', 'period' => $period,
'entries' => [], 'entries' => [],
'pc_entries' => [], 'pc_entries' => [],
]; ];
@@ -141,7 +142,7 @@ class AccountController extends Controller
$currentSet['primary_currency_decimal_places'] = $this->primaryCurrency->decimal_places; $currentSet['primary_currency_decimal_places'] = $this->primaryCurrency->decimal_places;
$pcPrevious = array_values($range)[0]['pc_balance']; $pcPrevious = array_values($range)[0]['pc_balance'];
} }
// create array of values to collect.
while ($currentStart <= $params['end']) { while ($currentStart <= $params['end']) {
$format = $currentStart->format('Y-m-d'); $format = $currentStart->format('Y-m-d');
@@ -158,8 +159,8 @@ class AccountController extends Controller
$pcPrevious = $pcBalance; $pcPrevious = $pcBalance;
$currentSet['pc_entries'][$label] = $pcBalance; $currentSet['pc_entries'][$label] = $pcBalance;
} }
$currentStart = Navigation::addPeriod($currentStart, $period);
$currentStart->addDay(); // $currentStart->addDay();
} }
$this->chartData[] = $currentSet; $this->chartData[] = $currentSet;
} }

View File

@@ -42,6 +42,7 @@ use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\Steam;
/** /**
* Class BudgetController * Class BudgetController
@@ -286,7 +287,7 @@ class BudgetController extends Controller
} }
if (null !== $limit && $this->convertToPrimary) { if (null !== $limit && $this->convertToPrimary) {
// convert and add all amounts. // convert and add all amounts.
$limit->amount = app('steam')->positive($amount); $limit->amount = Steam::positive($amount);
Log::debug(sprintf('Final amount in limit with converted amount %s', $limit->amount)); Log::debug(sprintf('Final amount in limit with converted amount %s', $limit->amount));
} }

View File

@@ -40,7 +40,7 @@ class IndexController extends Controller
{ {
use ValidatesUserGroupTrait; use ValidatesUserGroupTrait;
public const string RESOURCE_KEY = 'currency_exchange_rates'; public const string RESOURCE_KEY = 'exchange-rates';
protected array $acceptedRoles = [UserRoleEnum::OWNER]; protected array $acceptedRoles = [UserRoleEnum::OWNER];
private ExchangeRateRepositoryInterface $repository; private ExchangeRateRepositoryInterface $repository;

View File

@@ -486,7 +486,7 @@ class BasicController extends Controller
'currency_decimal_places' => $currencies[$currencyId]->decimal_places, 'currency_decimal_places' => $currencies[$currencyId]->decimal_places,
'value_parsed' => Amount::formatFlat($currencies[$currencyId]->symbol, $currencies[$currencyId]->decimal_places, $availableBudget, false), 'value_parsed' => Amount::formatFlat($currencies[$currencyId]->symbol, $currencies[$currencyId]->decimal_places, $availableBudget, false),
'local_icon' => 'money', 'local_icon' => 'money',
'sub_title' => Amount::formatFlat($currencies[$currencyId]->symbol, $currencies[$currencyId]->decimal_places, $availableBudget, false), 'sub_title' => Amount::formatFlat($currencies[$currencyId]->symbol, $currencies[$currencyId]->decimal_places, bcdiv($availableBudget, (string)$days), false),
]; ];
} }
foreach ($spent as $row) { foreach ($spent as $row) {

View File

@@ -29,6 +29,7 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
use FireflyIII\Support\Http\Controllers\CronRunner; use FireflyIII\Support\Http\Controllers\CronRunner;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class CronController * Class CronController
@@ -50,7 +51,7 @@ class CronController extends Controller
$return = []; $return = [];
$return['recurring_transactions'] = $this->runRecurring($config['force'], $config['date']); $return['recurring_transactions'] = $this->runRecurring($config['force'], $config['date']);
$return['auto_budgets'] = $this->runAutoBudget($config['force'], $config['date']); $return['auto_budgets'] = $this->runAutoBudget($config['force'], $config['date']);
if (true === config('cer.download_enabled')) { if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data) {
$return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']); $return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']);
} }
$return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']); $return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']);

View File

@@ -38,6 +38,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class AttemptController * Class AttemptController
@@ -71,7 +72,7 @@ class AttemptController extends Controller
if ($message->webhook_id !== $webhook->id) { if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User lists webhook attempts of webhook #%d and message #%d, but webhooks are DISABLED.', $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User lists webhook attempts of webhook #%d and message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -115,7 +116,7 @@ class AttemptController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match'); throw new FireflyException('200041: Webhook message and webhook attempt are no match');
} }
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User views single webhook attempt #%d of webhook #%d and message #%d, but webhooks are DISABLED', $attempt->id, $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User views single webhook attempt #%d of webhook #%d and message #%d, but webhooks are DISABLED', $attempt->id, $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Preferences;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class DestroyController * Class DestroyController
@@ -63,7 +64,7 @@ class DestroyController extends Controller
*/ */
public function destroy(Webhook $webhook): JsonResponse public function destroy(Webhook $webhook): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d. but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d. but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -93,7 +94,7 @@ class DestroyController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match'); throw new FireflyException('200041: Webhook message and webhook attempt are no match');
} }
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, attempt #%d, but webhooks are DISABLED.', $webhook->id, $message->id, $attempt->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, attempt #%d, but webhooks are DISABLED.', $webhook->id, $message->id, $attempt->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -121,7 +122,7 @@ class DestroyController extends Controller
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, but webhooks are DISABLED.', $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -37,6 +37,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class MessageController * Class MessageController
@@ -65,7 +66,7 @@ class MessageController extends Controller
*/ */
public function index(Webhook $webhook): JsonResponse public function index(Webhook $webhook): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view messages of webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to view messages of webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -105,7 +106,7 @@ class MessageController extends Controller
if ($message->webhook_id !== $webhook->id) { if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view message #%d of webhook #%d, but webhooks are DISABLED.', $message->id, $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to view message #%d of webhook #%d, but webhooks are DISABLED.', $message->id, $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -42,6 +42,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class ShowController * Class ShowController
@@ -72,7 +73,7 @@ class ShowController extends Controller
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to view all webhooks, but webhooks are DISABLED.'); Log::channel('audit')->info('User tries to view all webhooks, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -114,7 +115,7 @@ class ShowController extends Controller
*/ */
public function show(Webhook $webhook): JsonResponse public function show(Webhook $webhook): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to view webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->info(sprintf('User tries to view webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -146,7 +147,7 @@ class ShowController extends Controller
*/ */
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to trigger webhook #%d on transaction group #%d, but webhooks are DISABLED.', $webhook->id, $group->id)); Log::channel('audit')->info(sprintf('User tries to trigger webhook #%d on transaction group #%d, but webhooks are DISABLED.', $webhook->id, $group->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -34,6 +34,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class StoreController * Class StoreController
@@ -63,7 +64,7 @@ class StoreController extends Controller
public function store(CreateRequest $request): JsonResponse public function store(CreateRequest $request): JsonResponse
{ {
$data = $request->getData(); $data = $request->getData();
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data); Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data);
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class SubmitController * Class SubmitController
@@ -58,7 +59,7 @@ class SubmitController extends Controller
*/ */
public function submit(Webhook $webhook): JsonResponse public function submit(Webhook $webhook): JsonResponse
{ {
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to submit webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->info(sprintf('User tries to submit webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -35,6 +35,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateController * Class UpdateController
@@ -63,7 +64,7 @@ class UpdateController extends Controller
public function update(Webhook $webhook, UpdateRequest $request): JsonResponse public function update(Webhook $webhook, UpdateRequest $request): JsonResponse
{ {
$data = $request->getData(); $data = $request->getData();
if (false === config('firefly.allow_webhooks')) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data); Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data);
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -40,6 +40,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation; use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class StoreRequest * Class StoreRequest
@@ -176,7 +177,7 @@ class StoreRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
Log::debug('Collect rules of TransactionStoreRequest'); Log::debug('Collect rules of TransactionStoreRequest');
$validProtocols = config('firefly.valid_url_protocols'); $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
$locationRules = Location::requestRules([]); $locationRules = Location::requestRules([]);
return [ return [

View File

@@ -38,6 +38,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation; use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateRequest * Class UpdateRequest
@@ -248,7 +249,7 @@ class UpdateRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
Log::debug(sprintf('Now in %s', __METHOD__)); Log::debug(sprintf('Now in %s', __METHOD__));
$validProtocols = config('firefly.valid_url_protocols'); $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [ return [
// basic fields for group: // basic fields for group:
@@ -339,6 +340,9 @@ class UpdateRequest extends FormRequest
// if more than one, verify that there are journal ID's present. // if more than one, verify that there are journal ID's present.
$this->validateJournalIds($validator, $transactionGroup); $this->validateJournalIds($validator, $transactionGroup);
// if more than one split, needs group title
$this->validateGroupDescription($validator);
// all transaction types must be equal: // all transaction types must be equal:
$this->validateTransactionTypesForUpdate($validator); $this->validateTransactionTypesForUpdate($validator);

View File

@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks; use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class CreateRequest * Class CreateRequest
@@ -73,7 +74,7 @@ class CreateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers())); $triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses())); $responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries())); $deliveries = implode(',', array_values(Webhook::getDeliveries()));
$validProtocols = config('firefly.valid_url_protocols'); $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [ return [
'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title', 'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title',

View File

@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks; use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateRequest * Class UpdateRequest
@@ -73,7 +74,7 @@ class UpdateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers())); $triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses())); $responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries())); $deliveries = implode(',', array_values(Webhook::getDeliveries()));
$validProtocols = config('firefly.valid_url_protocols'); $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
/** @var Webhook $webhook */ /** @var Webhook $webhook */
$webhook = $this->route()->parameter('webhook'); $webhook = $this->route()->parameter('webhook');

View File

@@ -0,0 +1,68 @@
<?php
declare(strict_types=1);
/*
* ClearsEmptyForeignAmounts.php
* Copyright (c) 2025 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\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Transaction;
use Illuminate\Console\Command;
class ClearsEmptyForeignAmounts extends Command
{
use ShowsFriendlyMessages;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'correction:clears-empty-foreign-amounts';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Removes references to foreign amounts if there is no amount.';
/**
* Execute the console command.
*/
public function handle(): int
{
// transaction: has no amount, but reference to currency.
$count = Transaction::whereNull('foreign_amount')->whereNotNull('foreign_currency_id')->count();
if ($count > 0) {
Transaction::whereNull('foreign_amount')->whereNotNull('foreign_currency_id')->update(['foreign_currency_id' => null]);
$this->friendlyInfo(sprintf('Corrected %d invalid foreign amount reference(s)', $count));
}
// transaction: has amount, but no currency.
$count = Transaction::whereNull('foreign_currency_id')->whereNotNull('foreign_amount')->count();
if ($count > 0) {
Transaction::whereNull('foreign_currency_id')->whereNotNull('foreign_amount')->update(['foreign_amount' => null]);
$this->friendlyInfo(sprintf('Corrected %d invalid foreign amount reference(s)', $count));
}
return self::SUCCESS;
}
}

View File

@@ -39,6 +39,7 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType; use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Facades\Amount; use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\Steam;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
@@ -78,6 +79,8 @@ class CorrectsAmounts extends Command
private function correctTransfers(): void private function correctTransfers(): void
{ {
Log::debug('Will now correct transfers.');
/** @var AccountRepositoryInterface $repository */ /** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class); $repository = app(AccountRepositoryInterface::class);
$type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first(); $type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first();
@@ -88,24 +91,21 @@ class CorrectsAmounts extends Command
$repository->setUser($journal->user); $repository->setUser($journal->user);
$primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup); $primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup);
/** @var null|Transaction $source */ $valid = $this->validateJournal($journal);
$source = $journal->transactions()->where('amount', '<', 0)->first(); if (false === $valid) {
Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id));
/** @var null|Transaction $destination */
$destination = $journal->transactions()->where('amount', '>', 0)->first();
if (null === $source || null === $destination) {
continue;
}
if (null === $source->foreign_currency_id || null === $destination->foreign_currency_id) {
continue; continue;
} }
Log::debug(sprintf('Journal #%d is ready to be corrected (if necessary).', $journal->id));
$source = $journal->transactions()->where('amount', '<', '0')->first();
$destination = $journal->transactions()->where('amount', '>', '0')->first();
$sourceAccount = $source->account; $sourceAccount = $source->account;
$destAccount = $destination->account; $destAccount = $destination->account;
if (null === $sourceAccount || null === $destAccount) {
continue;
}
$sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary; $sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary;
$destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary; $destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary;
Log::debug(sprintf('Currency of source account #%d "%s" is %s', $sourceAccount->id, $sourceAccount->name, $sourceCurrency->code));
Log::debug(sprintf('Currency of destination account #%d "%s" is %s', $destAccount->id, $destAccount->name, $destCurrency->code));
if ($sourceCurrency->id === $destCurrency->id) { if ($sourceCurrency->id === $destCurrency->id) {
Log::debug('Both accounts have the same currency. Removing foreign currency info.'); Log::debug('Both accounts have the same currency. Removing foreign currency info.');
@@ -119,20 +119,38 @@ class CorrectsAmounts extends Command
continue; continue;
} }
// validate source // validate source transaction
if ($destCurrency->id !== $source->foreign_currency_id) { if ($destCurrency->id !== $source->foreign_currency_id) {
Log::debug(sprintf('Journal #%d: Transaction #%d refers to "%s" but should refer to "%s".', $journal->id, $source->id, $source->foreignCurrency->code, $destCurrency->code)); Log::debug(sprintf('[a] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', $journal->id, $source->id, $source->foreignCurrency->code, $destCurrency->code));
$source->foreign_currency_id = $destCurrency->id; $source->foreign_currency_id = $destCurrency->id;
$source->save(); $source->save();
} }
if ($sourceCurrency->id !== $source->transaction_currency_id) {
Log::debug(sprintf('[b] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', $journal->id, $source->id, $source->transactionCurrency->code, $sourceCurrency->code));
$source->transaction_currency_id = $sourceCurrency->id;
$source->save();
}
// validate destination: // validate destination:
if ($sourceCurrency->id !== $destination->foreign_currency_id) { if ($sourceCurrency->id !== $destination->foreign_currency_id) {
Log::debug(sprintf('Journal #%d: Transaction #%d refers to "%s" but should refer to "%s".', $journal->id, $destination->id, $destination->foreignCurrency->code, $sourceCurrency->code)); Log::debug(sprintf('[c] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', $journal->id, $destination->id, $destination->foreignCurrency->code, $sourceCurrency->code));
$destination->foreign_currency_id = $sourceCurrency->id; $destination->foreign_currency_id = $sourceCurrency->id;
$destination->save(); $destination->save();
} }
if ($destCurrency->id !== $destination->transaction_currency_id) {
Log::debug(sprintf('[d] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', $journal->id, $destination->id, $destination->transactionCurrency->code, $destCurrency->code));
$destination->transaction_currency_id = $destCurrency->id;
$destination->save();
} }
Log::debug(sprintf('Done with journal #%d.', $journal->id));
}
}
private function deleteJournal(TransactionJournal $journal): void
{
$journal->transactionGroup?->delete();
$journal->delete();
} }
private function fixAutoBudgets(): void private function fixAutoBudgets(): void
@@ -244,7 +262,7 @@ class CorrectsAmounts extends Command
return false; return false;
} }
if (-1 === $check) { if (-1 === $check) {
$item->trigger_value = app('steam')->positive($item->trigger_value); $item->trigger_value = Steam::positive($item->trigger_value);
$item->save(); $item->save();
return true; return true;
@@ -252,4 +270,57 @@ class CorrectsAmounts extends Command
return false; return false;
} }
private function validateJournal(TransactionJournal $journal): bool
{
$countSource = $journal->transactions()->where('amount', '<', 0)->count();
$countDest = $journal->transactions()->where('amount', '>', 0)->count();
if (1 !== $countSource || 1 !== $countDest) {
$this->friendlyError(sprintf('Transaction journal #%d has bad transaction information. Will delete.', $journal->id));
$this->deleteJournal($journal);
Log::error(sprintf('Transaction journal #%d has bad transaction information. Will delete.', $journal->id));
return false;
}
/** @var null|Transaction $source */
$source = $journal->transactions()->where('amount', '<', 0)->first();
/** @var null|Transaction $destination */
$destination = $journal->transactions()->where('amount', '>', 0)->first();
if (null === $source || null === $destination) {
$this->friendlyError(sprintf('Could not find source OR destination for journal #%d .', $journal->id));
Log::error(sprintf('Could not find source OR destination for journal #%d .', $journal->id));
$this->deleteJournal($journal);
return false;
}
if (null === $source->foreign_currency_id || null === $destination->foreign_currency_id) {
Log::debug('No foreign currency information is present, can safely continue with other transactions.');
return false;
}
if (null === $source->foreign_amount || null === $destination->foreign_amount) {
$this->friendlyError(sprintf('Transactions of journal #%d have no foreign amount, but have foreign currency info. Will reset this.', $journal->id));
$source->foreign_currency_id = null;
$source->save();
$destination->foreign_currency_id = null;
$source->save();
return false;
}
$sourceAccount = $source->account;
$destAccount = $destination->account;
if (null === $sourceAccount || null === $destAccount) {
$this->friendlyError(sprintf('Could not find accounts for journal #%d,', $journal->id));
$this->deleteJournal($journal);
return false;
}
return true;
}
} }

View File

@@ -63,7 +63,7 @@ class CorrectsCurrencies extends Command
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
// first check if the user has any default currency (not necessarily the case, so can be forced). // first check if the user has any default currency (not necessarily the case, so can be forced).
$primaryCurrency = app('amount')->getPrimaryCurrencyByUserGroup($userGroup); $primaryCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($userGroup);
Log::debug(sprintf('Now correcting currencies for user group #%d', $userGroup->id)); Log::debug(sprintf('Now correcting currencies for user group #%d', $userGroup->id));
$found = [$primaryCurrency->id]; $found = [$primaryCurrency->id];

View File

@@ -74,9 +74,11 @@ class CorrectsDatabase extends Command
'correction:group-accounts', 'correction:group-accounts',
'correction:recalculates-liabilities', 'correction:recalculates-liabilities',
'correction:preferences', 'correction:preferences',
'correction:corrects-inverted-budget-limits',
// 'correction:transaction-types', // resource heavy, disabled. // 'correction:transaction-types', // resource heavy, disabled.
'correction:recalculate-pc-amounts', 'correction:recalculate-pc-amounts',
'correction:remove-links-to-deleted-objects', 'correction:remove-links-to-deleted-objects',
'correction:clears-empty-foreign-amounts',
'firefly-iii:report-integrity', 'firefly-iii:report-integrity',
]; ];
foreach ($commands as $command) { foreach ($commands as $command) {

View File

@@ -29,6 +29,7 @@ use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use FireflyIII\Support\Facades\Steam;
class CorrectsIbans extends Command class CorrectsIbans extends Command
{ {
@@ -55,7 +56,7 @@ class CorrectsIbans extends Command
/** @var Account $account */ /** @var Account $account */
foreach ($accounts as $account) { foreach ($accounts as $account) {
$iban = (string) $account->iban; $iban = (string) $account->iban;
$newIban = app('steam')->filterSpaces($iban); $newIban = Steam::filterSpaces($iban);
if ('' !== $iban && $iban !== $newIban) { if ('' !== $iban && $iban !== $newIban) {
$account->iban = $newIban; $account->iban = $newIban;
$account->save(); $account->save();
@@ -66,7 +67,7 @@ class CorrectsIbans extends Command
$accountNumber = $account->accountMeta->where('name', 'account_number')->first(); $accountNumber = $account->accountMeta->where('name', 'account_number')->first();
if (null !== $accountNumber) { if (null !== $accountNumber) {
$number = (string) $accountNumber->value; $number = (string) $accountNumber->value;
$newNumber = app('steam')->filterSpaces($number); $newNumber = Steam::filterSpaces($number);
if ('' !== $number && $number !== $newNumber) { if ('' !== $number && $number !== $newNumber) {
$accountNumber->value = $newNumber; $accountNumber->value = $newNumber;
$accountNumber->save(); $accountNumber->save();

View File

@@ -0,0 +1,80 @@
<?php
declare(strict_types=1);
/*
* CorrectsInversedBudgetLimits.php
* Copyright (c) 2025 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\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class CorrectsInvertedBudgetLimits extends Command
{
use ShowsFriendlyMessages;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'correction:corrects-inverted-budget-limits';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Reverse budget limits where the dates are inverted.';
/**
* Execute the console command.
*/
public function handle(): int
{
$set = BudgetLimit::where('start_date', '>', DB::raw('end_date'))->get();
if (0 === $set->count()) {
Log::debug('No inverted budget limits found.');
return Command::SUCCESS;
}
/** @var BudgetLimit $budgetLimit */
foreach ($set as $budgetLimit) {
$start = $budgetLimit->start_date->copy();
$end = $budgetLimit->end_date->copy();
$budgetLimit->start_date = $end;
$budgetLimit->end_date = $start;
$budgetLimit->saveQuietly();
}
if (1 === $set->count()) {
$this->friendlyInfo('Corrected one budget limit to have the right start/end dates.');
return Command::SUCCESS;
}
$this->friendlyInfo(sprintf('Corrected %d budget limits to have the right start/end dates.', count($set)));
return Command::SUCCESS;
}
}

View File

@@ -133,6 +133,6 @@ class CorrectsOpeningBalanceCurrencies extends Command
$repos = app(AccountRepositoryInterface::class); $repos = app(AccountRepositoryInterface::class);
$repos->setUser($account->user); $repos->setUser($account->user);
return $repos->getAccountCurrency($account) ?? app('amount')->getPrimaryCurrencyByUserGroup($account->userGroup); return $repos->getAccountCurrency($account) ?? \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($account->userGroup);
} }
} }

View File

@@ -48,6 +48,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as DatabaseBuilder; use Illuminate\Database\Query\Builder as DatabaseBuilder;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class CorrectsPrimaryCurrencyAmounts extends Command class CorrectsPrimaryCurrencyAmounts extends Command
{ {
@@ -62,7 +63,7 @@ class CorrectsPrimaryCurrencyAmounts extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (false === config('cer.enabled')) { if (false === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
$this->friendlyInfo('This command will not run because currency exchange rates are disabled.'); $this->friendlyInfo('This command will not run because currency exchange rates are disabled.');
return 0; return 0;

View File

@@ -30,6 +30,7 @@ use FireflyIII\Enums\TransactionTypeEnum;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Facades\FireflyConfig;
use FireflyIII\Support\Facades\Steam; use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -60,7 +61,7 @@ class CorrectsUnevenAmount extends Command
$this->fixUnevenAmounts(); $this->fixUnevenAmounts();
$this->matchCurrencies(); $this->matchCurrencies();
if (true === config('firefly.feature_flags.running_balance_column')) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.');
AccountBalanceCalculator::recalculateAll(false); AccountBalanceCalculator::recalculateAll(false);
$this->friendlyInfo('Done recalculating transaction running balance columns.'); $this->friendlyInfo('Done recalculating transaction running balance columns.');
@@ -112,9 +113,9 @@ class CorrectsUnevenAmount extends Command
if ($source->transaction_currency_id === $destination->transaction_currency_id) { if ($source->transaction_currency_id === $destination->transaction_currency_id) {
Log::debug('Ready to swap data between transactions.'); Log::debug('Ready to swap data between transactions.');
$destination->foreign_currency_id = $source->transaction_currency_id; $destination->foreign_currency_id = $source->transaction_currency_id;
$destination->foreign_amount = app('steam')->positive($source->amount); $destination->foreign_amount = Steam::positive($source->amount);
$destination->transaction_currency_id = $source->foreign_currency_id; $destination->transaction_currency_id = $source->foreign_currency_id;
$destination->amount = app('steam')->positive($source->foreign_amount); $destination->amount = Steam::positive($source->foreign_amount);
$destination->balance_dirty = true; $destination->balance_dirty = true;
$source->balance_dirty = true; $source->balance_dirty = true;
$destination->save(); $destination->save();
@@ -132,11 +133,7 @@ class CorrectsUnevenAmount extends Command
private function fixUnevenAmounts(): void private function fixUnevenAmounts(): void
{ {
Log::debug('fixUnevenAmounts()'); Log::debug('fixUnevenAmounts()');
$journals = DB::table('transactions') $journals = DB::table('transactions')->groupBy('transaction_journal_id')->whereNull('deleted_at')->get(['transaction_journal_id', DB::raw('SUM(amount) AS the_sum')]);
->groupBy('transaction_journal_id')
->whereNull('deleted_at')
->get(['transaction_journal_id', DB::raw('SUM(amount) AS the_sum')])
;
/** @var stdClass $entry */ /** @var stdClass $entry */
foreach ($journals as $entry) { foreach ($journals as $entry) {
@@ -146,11 +143,7 @@ class CorrectsUnevenAmount extends Command
|| '' === $sum // @phpstan-ignore-line || '' === $sum // @phpstan-ignore-line
|| str_contains($sum, 'e') || str_contains($sum, 'e')
|| str_contains($sum, ',')) { || str_contains($sum, ',')) {
$message = sprintf( $message = sprintf('Journal #%d has an invalid sum ("%s"). No sure what to do.', $entry->transaction_journal_id, $entry->the_sum);
'Journal #%d has an invalid sum ("%s"). No sure what to do.',
$entry->transaction_journal_id,
$entry->the_sum
);
$this->friendlyWarning($message); $this->friendlyWarning($message);
Log::warning($message); Log::warning($message);
++$this->count; ++$this->count;
@@ -184,13 +177,7 @@ class CorrectsUnevenAmount extends Command
$source = $journal->transactions()->where('amount', '<', 0)->first(); $source = $journal->transactions()->where('amount', '<', 0)->first();
if (null === $source) { if (null === $source) {
$this->friendlyError( $this->friendlyError(sprintf('Journal #%d ("%s") has no source transaction. It will be deleted to maintain database consistency.', $journal->id ?? 0, $journal->description ?? ''));
sprintf(
'Journal #%d ("%s") has no source transaction. It will be deleted to maintain database consistency.',
$journal->id ?? 0,
$journal->description ?? ''
)
);
Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete(); Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
TransactionJournal::where('id', $journal->id ?? 0)->forceDelete(); TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
++$this->count; ++$this->count;
@@ -205,13 +192,7 @@ class CorrectsUnevenAmount extends Command
$destination = $journal->transactions()->where('amount', '>', 0)->first(); $destination = $journal->transactions()->where('amount', '>', 0)->first();
if (null === $destination) { if (null === $destination) {
$this->friendlyError( $this->friendlyError(sprintf('Journal #%d ("%s") has no destination transaction. It will be deleted to maintain database consistency.', $journal->id ?? 0, $journal->description ?? ''));
sprintf(
'Journal #%d ("%s") has no destination transaction. It will be deleted to maintain database consistency.',
$journal->id ?? 0,
$journal->description ?? ''
)
);
Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete(); Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
TransactionJournal::where('id', $journal->id ?? 0)->forceDelete(); TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
@@ -257,8 +238,8 @@ class CorrectsUnevenAmount extends Command
// source currency = dest foreign currency // source currency = dest foreign currency
// dest amount = source foreign currency // dest amount = source foreign currency
// dest currency = source foreign currency // dest currency = source foreign currency
// Log::debug(sprintf('[a] %s', bccomp(app('steam')->positive($source->amount), app('steam')->positive($destination->foreign_amount)))); // Log::debug(sprintf('[a] %s', bccomp(\FireflyIII\Support\Facades\Steam::positive($source->amount), \FireflyIII\Support\Facades\Steam::positive($destination->foreign_amount))));
// Log::debug(sprintf('[b] %s', bccomp(app('steam')->positive($destination->amount), app('steam')->positive($source->foreign_amount)))); // Log::debug(sprintf('[b] %s', bccomp(\FireflyIII\Support\Facades\Steam::positive($destination->amount), \FireflyIII\Support\Facades\Steam::positive($source->foreign_amount))));
// Log::debug(sprintf('[c] %s', var_export($source->transaction_currency_id === $destination->foreign_currency_id,true))); // Log::debug(sprintf('[c] %s', var_export($source->transaction_currency_id === $destination->foreign_currency_id,true)));
// Log::debug(sprintf('[d] %s', var_export((int) $destination->transaction_currency_id ===(int) $source->foreign_currency_id, true))); // Log::debug(sprintf('[d] %s', var_export((int) $destination->transaction_currency_id ===(int) $source->foreign_currency_id, true)));
return 0 === bccomp(Steam::positive($source->amount), Steam::positive($destination->foreign_amount)) return 0 === bccomp(Steam::positive($source->amount), Steam::positive($destination->foreign_amount))
@@ -428,9 +409,9 @@ class CorrectsUnevenAmount extends Command
// // only fix the destination transaction // // only fix the destination transaction
// $destination->foreign_currency_id = $source->transaction_currency_id; // $destination->foreign_currency_id = $source->transaction_currency_id;
// $destination->foreign_amount = app('steam')->positive($source->amount); // $destination->foreign_amount = \FireflyIII\Support\Facades\Steam::positive($source->amount);
// $destination->transaction_currency_id = $source->foreign_currency_id; // $destination->transaction_currency_id = $source->foreign_currency_id;
// $destination->amount = app('steam')->positive($source->foreign_amount); // $destination->amount = \FireflyIII\Support\Facades\Steam::positive($source->foreign_amount);
// $destination->balance_dirty = true; // $destination->balance_dirty = true;
// $source->balance_dirty = true; // $source->balance_dirty = true;
// $destination->save(); // $destination->save();

View File

@@ -86,17 +86,27 @@ class RemovesLinksToDeletedObjects extends Command
private function cleanupJournals(array $journals): void private function cleanupJournals(array $journals): void
{ {
$count = DB::table('tag_transaction_journal')->whereIn('transaction_journal_id', $journals)->delete(); $countTags = 0;
if ($count > 0) { $countBudgets = 0;
$this->friendlyInfo(sprintf('Removed %d old relationship(s) between tags and transactions.', $count)); $countCategories = 0;
// #11333
foreach (array_chunk($journals, 1337) as $set) {
$countTags += DB::table('tag_transaction_journal')->whereIn('transaction_journal_id', $set)->delete();
$countBudgets += DB::table('budget_transaction_journal')->whereIn('transaction_journal_id', $set)->delete();
$countCategories += DB::table('category_transaction_journal')->whereIn('transaction_journal_id', $set)->delete();
} }
$count = DB::table('budget_transaction_journal')->whereIn('transaction_journal_id', $journals)->delete();
if ($count > 0) {
$this->friendlyInfo(sprintf('Removed %d old relationship(s) between budgets and transactions.', $count));
if ($countTags > 0) {
$this->friendlyInfo(sprintf('Removed %d old relationship(s) between tags and transactions.', $countTags));
} }
$count = DB::table('category_transaction_journal')->whereIn('transaction_journal_id', $journals)->delete();
if ($count > 0) { if ($countBudgets > 0) {
$this->friendlyInfo(sprintf('Removed %d old relationship(s) categories and transactions.', $count)); $this->friendlyInfo(sprintf('Removed %d old relationship(s) between budgets and transactions.', $countBudgets));
}
if ($countCategories > 0) {
$this->friendlyInfo(sprintf('Removed %d old relationship(s) categories and transactions.', $countCategories));
} }
} }

View File

@@ -1,26 +0,0 @@
<?php
namespace FireflyIII\Console\Commands\Integrity;
use Illuminate\Console\Command;
class ReportSkeleton extends Command
{
protected $description = 'DESCRIPTION HERE';
protected $signature = 'firefly-iii:INT_COMMAND';
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
//
$this->warn('Congrats, you found the skeleton command. Boo!');
return 0;
}
}

View File

@@ -48,6 +48,7 @@ class ReportsIntegrity extends Command
$commands = [ $commands = [
'integrity:empty-objects', 'integrity:empty-objects',
'integrity:total-sums', 'integrity:total-sums',
'integrity:file-permissions',
]; ];
foreach ($commands as $command) { foreach ($commands as $command) {
$this->friendlyLine(sprintf('Now executing %s', $command)); $this->friendlyLine(sprintf('Now executing %s', $command));

View File

@@ -0,0 +1,74 @@
<?php
declare(strict_types=1);
/*
* ValidatesFilePermissions.php
* Copyright (c) 2025 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\Integrity;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command;
class ValidatesFilePermissions extends Command
{
use ShowsFriendlyMessages;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'integrity:file-permissions';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle(): int
{
$directories = [storage_path('upload')];
$errors = false;
/** @var string $directory */
foreach ($directories as $directory) {
if (!is_dir($directory)) {
$this->friendlyError(sprintf('Directory "%s" cannot found. It is necessary to allow files to be uploaded.', $directory));
$errors = true;
continue;
}
if (!is_writable($directory)) {
$this->friendlyError(sprintf('Directory "%s" is not writeable. Uploading attachments may fail silently.', $directory));
$errors = true;
}
}
if (false === $errors) {
$this->friendlyInfo('All necessary file paths seem to exist, and are writeable.');
}
return self::SUCCESS;
}
}

View File

@@ -56,7 +56,7 @@ class ForcesDecimalSize extends Command
use ShowsFriendlyMessages; use ShowsFriendlyMessages;
protected $description = 'This command resizes DECIMAL columns in MySQL or PostgreSQL and correct amounts (only MySQL).'; protected $description = 'This command resizes DECIMAL columns in MySQL or PostgreSQL and correct amounts (only MySQL).';
protected $signature = 'firefly-iii:force-decimal-size'; protected $signature = 'firefly-iii:force-decimal-size {--force}';
private string $cast; private string $cast;
private array $classes private array $classes
= [ = [
@@ -98,9 +98,14 @@ class ForcesDecimalSize extends Command
Log::debug('Now in ForceDecimalSize::handle()'); Log::debug('Now in ForceDecimalSize::handle()');
$this->determineDatabaseType(); $this->determineDatabaseType();
$force = $this->option('force');
$question = true;
if (false === $force) {
$this->friendlyError('Running this command is dangerous and can cause data loss.'); $this->friendlyError('Running this command is dangerous and can cause data loss.');
$this->friendlyError('Please do not continue.'); $this->friendlyError('Please make sure you have a backup.');
$question = $this->confirm('Do you want to continue?'); $question = $this->confirm('Do you want to continue?');
}
if (true === $question) { if (true === $question) {
$this->correctAmounts(); $this->correctAmounts();
$this->updateDecimals(); $this->updateDecimals();

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\System;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class RecalculatesRunningBalance extends Command class RecalculatesRunningBalance extends Command
{ {
@@ -52,7 +53,7 @@ class RecalculatesRunningBalance extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (true === config('firefly.feature_flags.running_balance_column')) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->correctBalanceAmounts($this->option('force')); $this->correctBalanceAmounts($this->option('force'));
$this->friendlyInfo('Done recalculating account balances.'); $this->friendlyInfo('Done recalculating account balances.');

View File

@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use League\Flysystem\FilesystemException; use League\Flysystem\FilesystemException;
use Safe\Exceptions\JsonException; use Safe\Exceptions\JsonException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode; use function Safe\json_decode;
@@ -107,8 +108,8 @@ class VerifySecurityAlerts extends Command
private function removeOldAdvisory(): void private function removeOldAdvisory(): void
{ {
try { try {
app('fireflyconfig')->delete('upgrade_security_message'); FireflyConfig::delete('upgrade_security_message');
app('fireflyconfig')->delete('upgrade_security_level'); FireflyConfig::delete('upgrade_security_level');
} catch (QueryException $e) { } catch (QueryException $e) {
Log::debug(sprintf('Could not delete old security advisory, but thats OK: %s', $e->getMessage())); Log::debug(sprintf('Could not delete old security advisory, but thats OK: %s', $e->getMessage()));
} }
@@ -117,8 +118,8 @@ class VerifySecurityAlerts extends Command
private function saveSecurityAdvisory(array $array): void private function saveSecurityAdvisory(array $array): void
{ {
try { try {
app('fireflyconfig')->set('upgrade_security_message', $array['message']); FireflyConfig::set('upgrade_security_message', $array['message']);
app('fireflyconfig')->set('upgrade_security_level', $array['level']); FireflyConfig::set('upgrade_security_level', $array['level']);
} catch (QueryException $e) { } catch (QueryException $e) {
Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage())); Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage()));
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Support\Cronjobs\WebhookCronjob;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use InvalidArgumentException; use InvalidArgumentException;
use FireflyIII\Support\Facades\FireflyConfig;
class Cron extends Command class Cron extends Command
{ {
@@ -72,7 +73,7 @@ class Cron extends Command
$force = (bool) $this->option('force'); // @phpstan-ignore-line $force = (bool) $this->option('force'); // @phpstan-ignore-line
// Fire exchange rates cron job. // Fire exchange rates cron job.
if (true === config('cer.download_enabled') && ($doAll || $this->option('download-cer'))) { if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data && ($doAll || $this->option('download-cer'))) {
try { try {
$this->exchangeRatesCronJob($force, $date); $this->exchangeRatesCronJob($force, $date);
} catch (FireflyException $e) { } catch (FireflyException $e) {

View File

@@ -32,6 +32,7 @@ use Illuminate\Console\Command;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use FireflyIII\Support\Facades\FireflyConfig;
class AddsTransactionIdentifiers extends Command class AddsTransactionIdentifiers extends Command
{ {
@@ -97,7 +98,7 @@ class AddsTransactionIdentifiers extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -157,6 +158,6 @@ class AddsTransactionIdentifiers extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use JsonException; use JsonException;
use stdClass; use stdClass;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode; use function Safe\json_decode;
@@ -86,7 +87,7 @@ class RemovesDatabaseDecryption extends Command
$this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table)); $this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table));
// mark as decrypted: // mark as decrypted:
$configName = sprintf('is_decrypted_%s', $table); $configName = sprintf('is_decrypted_%s', $table);
app('fireflyconfig')->set($configName, true); FireflyConfig::set($configName, true);
} }
private function isDecrypted(string $table): bool private function isDecrypted(string $table): bool
@@ -95,7 +96,7 @@ class RemovesDatabaseDecryption extends Command
$configVar = null; $configVar = null;
try { try {
$configVar = app('fireflyconfig')->get($configName, false); $configVar = FireflyConfig::get($configName, false);
} catch (FireflyException $e) { } catch (FireflyException $e) {
Log::error($e->getMessage()); Log::error($e->getMessage());
} }
@@ -133,7 +134,7 @@ class RemovesDatabaseDecryption extends Command
} }
// A separate routine for preferences table: // A separate routine for preferences table:
if ('preferences' === $table) { if ('preferences' === $table && is_string($value)) {
$this->decryptPreferencesRow($id, $value); $this->decryptPreferencesRow($id, $value);
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
* CorrectAccountBalance.php * RepairsAccountBalances.php
* Copyright (c) 2024 james@firefly-iii.org. * Copyright (c) 2024 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
@@ -27,6 +27,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class RepairsAccountBalances extends Command class RepairsAccountBalances extends Command
{ {
@@ -43,7 +44,7 @@ class RepairsAccountBalances extends Command
return 0; return 0;
} }
if (true === config('firefly.feature_flags.running_balance_column')) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->markAsExecuted(); $this->markAsExecuted();
$this->correctBalanceAmounts(); $this->correctBalanceAmounts();
@@ -58,14 +59,14 @@ class RepairsAccountBalances extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
private function correctBalanceAmounts(): void private function correctBalanceAmounts(): void

View File

@@ -41,7 +41,7 @@ class UpgradeSkeleton extends Command
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false);
if (null !== $configVar) { if (null !== $configVar) {
return (bool)$configVar->data; return (bool)$configVar->data;
} }
@@ -55,6 +55,6 @@ class UpgradeSkeleton extends Command
*/ */
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); \FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountCurrencies extends Command class UpgradesAccountCurrencies extends Command
{ {
@@ -85,7 +86,7 @@ class UpgradesAccountCurrencies extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
@@ -104,7 +105,7 @@ class UpgradesAccountCurrencies extends Command
$accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value]); $accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value]);
// get user's currency preference: // get user's currency preference:
$primaryCurrency = app('amount')->getPrimaryCurrencyByUserGroup($user->userGroup); $primaryCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($user->userGroup);
/** @var Account $account */ /** @var Account $account */
foreach ($accounts as $account) { foreach ($accounts as $account) {
@@ -155,6 +156,6 @@ class UpgradesAccountCurrencies extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountMetaData extends Command class UpgradesAccountMetaData extends Command
{ {
@@ -82,7 +83,7 @@ class UpgradesAccountMetaData extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -90,6 +91,6 @@ class UpgradesAccountMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -30,6 +30,7 @@ use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAttachments extends Command class UpgradesAttachments extends Command
{ {
@@ -92,7 +93,7 @@ class UpgradesAttachments extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -100,6 +101,6 @@ class UpgradesAttachments extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Facades\Preferences; use FireflyIII\Support\Facades\Preferences;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBillsToRules extends Command class UpgradesBillsToRules extends Command
{ {
@@ -99,7 +100,7 @@ class UpgradesBillsToRules extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -206,6 +207,6 @@ class UpgradesBillsToRules extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimitPeriods extends Command class UpgradesBudgetLimitPeriods extends Command
{ {
@@ -58,7 +59,7 @@ class UpgradesBudgetLimitPeriods extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
@@ -152,6 +153,6 @@ class UpgradesBudgetLimitPeriods extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -30,6 +30,7 @@ use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimits extends Command class UpgradesBudgetLimits extends Command
{ {
@@ -66,7 +67,7 @@ class UpgradesBudgetLimits extends Command
/** @var null|User $user */ /** @var null|User $user */
$user = $budget->user; $user = $budget->user;
if (null !== $user) { if (null !== $user) {
$currency = app('amount')->getPrimaryCurrencyByUserGroup($user->userGroup); $currency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($user->userGroup);
$budgetLimit->transaction_currency_id = $currency->id; $budgetLimit->transaction_currency_id = $currency->id;
$budgetLimit->save(); $budgetLimit->save();
$this->friendlyInfo( $this->friendlyInfo(
@@ -84,7 +85,7 @@ class UpgradesBudgetLimits extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -92,6 +93,6 @@ class UpgradesBudgetLimits extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -31,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCreditCardLiabilities extends Command class UpgradesCreditCardLiabilities extends Command
{ {
@@ -80,13 +81,13 @@ class UpgradesCreditCardLiabilities extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -33,6 +33,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCurrencyPreferences extends Command class UpgradesCurrencyPreferences extends Command
{ {
@@ -65,7 +66,7 @@ class UpgradesCurrencyPreferences extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -144,6 +145,6 @@ class UpgradesCurrencyPreferences extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -32,6 +32,7 @@ use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalMetaData extends Command class UpgradesJournalMetaData extends Command
{ {
@@ -69,14 +70,14 @@ class UpgradesJournalMetaData extends Command
private function isMigrated(): bool private function isMigrated(): bool
{ {
$configVar = app('fireflyconfig')->get(UpgradesToGroups::CONFIG_NAME, false); $configVar = FireflyConfig::get(UpgradesToGroups::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
@@ -218,6 +219,6 @@ class UpgradesJournalMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -29,6 +29,7 @@ use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalNotes extends Command class UpgradesJournalNotes extends Command
{ {
@@ -86,7 +87,7 @@ class UpgradesJournalNotes extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -94,6 +95,6 @@ class UpgradesJournalNotes extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -33,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Support\CreditRecalculateService; use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilities extends Command class UpgradesLiabilities extends Command
{ {
@@ -61,7 +62,7 @@ class UpgradesLiabilities extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -148,6 +149,6 @@ class UpgradesLiabilities extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilitiesEight extends Command class UpgradesLiabilitiesEight extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesLiabilitiesEight extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -148,7 +149,7 @@ class UpgradesLiabilitiesEight extends Command
->where('transaction_journals.transaction_type_id', $liabilityType->id) ->where('transaction_journals.transaction_type_id', $liabilityType->id)
->first(['transaction_journals.*']) ->first(['transaction_journals.*'])
; ;
if (null !== $liabilityJournal) { if (null !== $liabilityJournal && null !== $liabilityJournal->transactionGroup) {
$group = $liabilityJournal->transactionGroup; $group = $liabilityJournal->transactionGroup;
$service = new TransactionGroupDestroyService(); $service = new TransactionGroupDestroyService();
$service->destroy($group); $service->destroy($group);
@@ -192,18 +193,21 @@ class UpgradesLiabilitiesEight extends Command
->where('transactions.account_id', $account->id)->get(['transaction_journals.*']) ->where('transactions.account_id', $account->id)->get(['transaction_journals.*'])
; ;
$service = app(TransactionGroupDestroyService::class);
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
foreach ($journals as $journal) { foreach ($journals as $journal) {
$service = app(TransactionGroupDestroyService::class); if (null !== $journal->transactionGroup) {
$service->destroy($journal->transactionGroup); $service->destroy($journal->transactionGroup);
++$count; ++$count;
} }
}
return $count; return $count;
} }
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesMultiPiggyBanks extends Command class UpgradesMultiPiggyBanks extends Command
{ {
@@ -64,7 +65,7 @@ class UpgradesMultiPiggyBanks extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -94,7 +95,7 @@ class UpgradesMultiPiggyBanks extends Command
$this->repository->setUser($piggyBank->account->user); $this->repository->setUser($piggyBank->account->user);
$this->accountRepository->setUser($piggyBank->account->user); $this->accountRepository->setUser($piggyBank->account->user);
$repetition = $this->repository->getRepetition($piggyBank, true); $repetition = $this->repository->getRepetition($piggyBank, true);
$currency = $this->accountRepository->getAccountCurrency($piggyBank->account) ?? app('amount')->getPrimaryCurrencyByUserGroup($piggyBank->account->user->userGroup); $currency = $this->accountRepository->getAccountCurrency($piggyBank->account) ?? \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($piggyBank->account->user->userGroup);
// update piggy bank to have a currency. // update piggy bank to have a currency.
$piggyBank->transaction_currency_id = $currency->id; $piggyBank->transaction_currency_id = $currency->id;
@@ -112,6 +113,6 @@ class UpgradesMultiPiggyBanks extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesPrimaryCurrencyAmounts extends Command class UpgradesPrimaryCurrencyAmounts extends Command
{ {
@@ -60,7 +61,7 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -68,6 +69,6 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -29,6 +29,7 @@ use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceMeta; use FireflyIII\Models\RecurrenceMeta;
use FireflyIII\Models\RecurrenceTransactionMeta; use FireflyIII\Models\RecurrenceTransactionMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_encode; use function Safe\json_encode;
@@ -65,7 +66,7 @@ class UpgradesRecurrenceMetaData extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -117,6 +118,6 @@ class UpgradesRecurrenceMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleAction;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesRuleActions extends Command class UpgradesRuleActions extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesRuleActions extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -183,6 +184,6 @@ class UpgradesRuleActions extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Location; use FireflyIII\Models\Location;
use FireflyIII\Models\Tag; use FireflyIII\Models\Tag;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTagLocations extends Command class UpgradesTagLocations extends Command
{ {
@@ -57,7 +58,7 @@ class UpgradesTagLocations extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -97,6 +98,6 @@ class UpgradesTagLocations extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -39,6 +39,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesToGroups extends Command class UpgradesToGroups extends Command
{ {
@@ -97,7 +98,7 @@ class UpgradesToGroups extends Command
private function isMigrated(): bool private function isMigrated(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -379,6 +380,6 @@ class UpgradesToGroups extends Command
private function markAsMigrated(): void private function markAsMigrated(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTransferCurrencies extends Command class UpgradesTransferCurrencies extends Command
{ {
@@ -105,7 +106,7 @@ class UpgradesTransferCurrencies extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -480,6 +481,6 @@ class UpgradesTransferCurrencies extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesVariousCurrencyInformation extends Command class UpgradesVariousCurrencyInformation extends Command
{ {
@@ -86,7 +87,7 @@ class UpgradesVariousCurrencyInformation extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -246,6 +247,6 @@ class UpgradesVariousCurrencyInformation extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use FireflyIII\Models\WebhookDelivery as WebhookDeliveryModel;
use FireflyIII\Models\WebhookResponse as WebhookResponseModel; use FireflyIII\Models\WebhookResponse as WebhookResponseModel;
use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel; use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesWebhooks extends Command class UpgradesWebhooks extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesWebhooks extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -109,6 +110,6 @@ class UpgradesWebhooks extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
/*
* TriggeredStoredTransactionGroup.php
* Copyright (c) 2025 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\Events\Model\TransactionGroup;
use FireflyIII\Events\Event;
use FireflyIII\Models\TransactionGroup;
use Illuminate\Queue\SerializesModels;
class TriggeredStoredTransactionGroup extends Event
{
use SerializesModels;
/**
* Create a new event instance.
*/
public function __construct(public TransactionGroup $transactionGroup) {}
}

View File

@@ -42,7 +42,6 @@ use Illuminate\Validation\ValidationException as LaravelValidationException;
use Laravel\Passport\Exceptions\OAuthServerException as LaravelOAuthException; use Laravel\Passport\Exceptions\OAuthServerException as LaravelOAuthException;
use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Exception\OAuthServerException;
use Override; use Override;
use Sentry\Laravel\Integration;
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
@@ -50,6 +49,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable; use Throwable;
use FireflyIII\Support\Facades\Steam;
use function Safe\json_encode; use function Safe\json_encode;
use function Safe\parse_url; use function Safe\parse_url;
@@ -83,14 +83,7 @@ class Handler extends ExceptionHandler
* Register the exception handling callbacks for the application. * Register the exception handling callbacks for the application.
*/ */
#[Override] #[Override]
public function register(): void public function register(): void {}
{
if (true === config('firefly.report_errors_online')) {
$this->reportable(function (Throwable $e): void {
Integration::captureUnhandledException($e);
});
}
}
/** /**
* Render an exception into an HTTP response. It's complex but lucky for us, we never use it because * Render an exception into an HTTP response. It's complex but lucky for us, we never use it because
@@ -287,7 +280,7 @@ class Handler extends ExceptionHandler
protected function invalid($request, LaravelValidationException $exception): \Illuminate\Http\Response|JsonResponse|RedirectResponse protected function invalid($request, LaravelValidationException $exception): \Illuminate\Http\Response|JsonResponse|RedirectResponse
{ {
// protect against open redirect when submitting invalid forms. // protect against open redirect when submitting invalid forms.
$previous = app('steam')->getSafePreviousUrl(); $previous = Steam::getSafePreviousUrl();
$redirect = $this->getRedirectUrl($exception); $redirect = $this->getRedirectUrl($exception);
return redirect($redirect ?? $previous) return redirect($redirect ?? $previous)

View File

@@ -51,7 +51,7 @@ class BillFactory
Log::debug(sprintf('Now in %s', __METHOD__), $data); Log::debug(sprintf('Now in %s', __METHOD__), $data);
$factory = app(TransactionCurrencyFactory::class); $factory = app(TransactionCurrencyFactory::class);
$currency = $factory->find((int) ($data['currency_id'] ?? null), (string) ($data['currency_code'] ?? null)) $currency = $factory->find((int) ($data['currency_id'] ?? null), (string) ($data['currency_code'] ?? null))
?? app('amount')->getPrimaryCurrencyByUserGroup($this->user->userGroup); ?? \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup);
try { try {
$skip = array_key_exists('skip', $data) ? $data['skip'] : 0; $skip = array_key_exists('skip', $data) ? $data['skip'] : 0;

View File

@@ -126,7 +126,7 @@ class PiggyBankFactory
private function getCurrency(array $data): TransactionCurrency private function getCurrency(array $data): TransactionCurrency
{ {
// currency: // currency:
$primaryCurrency = app('amount')->getPrimaryCurrency(); $primaryCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrency();
$currency = null; $currency = null;
if (array_key_exists('transaction_currency_code', $data)) { if (array_key_exists('transaction_currency_code', $data)) {
$currency = $this->currencyRepository->findByCode((string)($data['transaction_currency_code'] ?? '')); $currency = $this->currencyRepository->findByCode((string)($data['transaction_currency_code'] ?? ''));

View File

@@ -34,6 +34,7 @@ use FireflyIII\Services\Internal\Update\AccountUpdateService;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\Steam;
/** /**
* Class TransactionFactory * Class TransactionFactory
@@ -58,10 +59,10 @@ class TransactionFactory
$foreignAmount = null; $foreignAmount = null;
} }
if (null !== $foreignAmount) { if (null !== $foreignAmount) {
$foreignAmount = app('steam')->negative($foreignAmount); $foreignAmount = Steam::negative($foreignAmount);
} }
return $this->create(app('steam')->negative($amount), $foreignAmount); return $this->create(Steam::negative($amount), $foreignAmount);
} }
/** /**
@@ -170,10 +171,10 @@ class TransactionFactory
$foreignAmount = null; $foreignAmount = null;
} }
if (null !== $foreignAmount) { if (null !== $foreignAmount) {
$foreignAmount = app('steam')->positive($foreignAmount); $foreignAmount = Steam::positive($foreignAmount);
} }
return $this->create(app('steam')->positive($amount), $foreignAmount); return $this->create(Steam::positive($amount), $foreignAmount);
} }
public function setAccount(Account $account): void public function setAccount(Account $account): void

View File

@@ -251,7 +251,7 @@ class TransactionJournalFactory
$foreignCurrency = $this->getForeignByAccount($type->type, $foreignCurrency, $destinationAccount); $foreignCurrency = $this->getForeignByAccount($type->type, $foreignCurrency, $destinationAccount);
$description = $this->getDescription($description); $description = $this->getDescription($description);
Log::debug(sprintf('Currency is #%d "%s", foreign currency is #%d "%s"', $currency->id, $currency->code, $foreignCurrency?->id, $foreignCurrency)); Log::debug(sprintf('Currency is #%d "%s", foreign currency is #%d "%s"', $currency->id, $currency->code, $foreignCurrency?->id, $foreignCurrency?->code));
Log::debug(sprintf('Date: %s (%s)', $carbon->toW3cString(), $carbon->getTimezone()->getName())); Log::debug(sprintf('Date: %s (%s)', $carbon->toW3cString(), $carbon->getTimezone()->getName()));
/** Create a basic journal. */ /** Create a basic journal. */
@@ -502,7 +502,7 @@ class TransactionJournalFactory
$preference = $this->accountRepository->getAccountCurrency($account); $preference = $this->accountRepository->getAccountCurrency($account);
if (null === $preference && !$currency instanceof TransactionCurrency) { if (null === $preference && !$currency instanceof TransactionCurrency) {
// return user's default: // return user's default:
return app('amount')->getPrimaryCurrencyByUserGroup($this->user->userGroup); return \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup);
} }
$result = $preference ?? $currency; $result = $preference ?? $currency;
Log::debug(sprintf('Currency is now #%d (%s) because of account #%d (%s)', $result->id, $result->code, $account->id, $account->name)); Log::debug(sprintf('Currency is now #%d (%s) because of account #%d (%s)', $result->id, $result->code, $account->id, $account->name));

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Generator\Chart\Basic; namespace FireflyIII\Generator\Chart\Basic;
use FireflyIII\Support\ChartColour; use FireflyIII\Support\ChartColour;
use FireflyIII\Support\Facades\Steam;
/** /**
* Class ChartJsGenerator. * Class ChartJsGenerator.
@@ -56,7 +57,7 @@ class ChartJsGenerator implements GeneratorInterface
$index = 0; $index = 0;
foreach ($data as $key => $valueArray) { foreach ($data as $key => $valueArray) {
// make larger than 0 // make larger than 0
$chartData['datasets'][0]['data'][] = app('steam')->positive((string) $valueArray['amount']); $chartData['datasets'][0]['data'][] = Steam::positive((string) $valueArray['amount']);
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index); $chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
$chartData['datasets'][0]['currency_symbol'][] = $valueArray['currency_symbol']; $chartData['datasets'][0]['currency_symbol'][] = $valueArray['currency_symbol'];
$chartData['labels'][] = $key; $chartData['labels'][] = $key;
@@ -163,7 +164,7 @@ class ChartJsGenerator implements GeneratorInterface
$index = 0; $index = 0;
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
// make larger than 0 // make larger than 0
$chartData['datasets'][0]['data'][] = app('steam')->positive((string) $value); $chartData['datasets'][0]['data'][] = Steam::positive((string) $value);
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index); $chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
$chartData['labels'][] = $key; $chartData['labels'][] = $key;

View File

@@ -144,7 +144,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
$dayBeforeBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $date)[$account->id]; $dayBeforeBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $date)[$account->id];
$startBalance = $dayBeforeBalance['balance']; $startBalance = $dayBeforeBalance['balance'];
$primaryCurrency = app('amount')->getPrimaryCurrencyByUserGroup($account->user->userGroup); $primaryCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($account->user->userGroup);
$currency = $accountRepository->getAccountCurrency($account) ?? $primaryCurrency; $currency = $accountRepository->getAccountCurrency($account) ?? $primaryCurrency;
foreach ($journals as $index => $journal) { foreach ($journals as $index => $journal) {
@@ -153,13 +153,13 @@ class MonthReportGenerator implements ReportGeneratorInterface
// make sure amount is in the right "direction". // make sure amount is in the right "direction".
if ($account->id === $journal['destination_account_id']) { if ($account->id === $journal['destination_account_id']) {
$transactionAmount = app('steam')->positive($journal['amount']); $transactionAmount = Steam::positive($journal['amount']);
} }
if ($currency->id === $journal['foreign_currency_id']) { if ($currency->id === $journal['foreign_currency_id']) {
$transactionAmount = $journal['foreign_amount']; $transactionAmount = $journal['foreign_amount'];
if ($account->id === $journal['destination_account_id']) { if ($account->id === $journal['destination_account_id']) {
$transactionAmount = app('steam')->positive($journal['foreign_amount']); $transactionAmount = Steam::positive($journal['foreign_amount']);
} }
} }
@@ -175,7 +175,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
$journals[$index]['payment_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'payment_date'); $journals[$index]['payment_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'payment_date');
$journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date'); $journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date');
} }
$locale = app('steam')->getLocale(); $locale = Steam::getLocale();
// call is correct. // call is correct.
Log::debug(sprintf('getAuditReport end: Call finalAccountBalance with date/time "%s"', $this->end->toIso8601String())); Log::debug(sprintf('getAuditReport end: Call finalAccountBalance with date/time "%s"', $this->end->toIso8601String()));

View File

@@ -37,6 +37,7 @@ use FireflyIII\Notifications\Test\OwnerTestNotificationPushover;
use FireflyIII\Notifications\Test\OwnerTestNotificationSlack; use FireflyIII\Notifications\Test\OwnerTestNotificationSlack;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class AdminEventHandler. * Class AdminEventHandler.
@@ -45,7 +46,7 @@ class AdminEventHandler
{ {
public function sendInvitationNotification(InvitationCreated $event): void public function sendInvitationNotification(InvitationCreated $event): void
{ {
$sendMail = app('fireflyconfig')->get('notification_invite_created', true)->data; $sendMail = FireflyConfig::get('notification_invite_created', true)->data;
if (false === $sendMail) { if (false === $sendMail) {
return; return;
} }
@@ -96,7 +97,7 @@ class AdminEventHandler
*/ */
public function sendNewVersion(NewVersionAvailable $event): void public function sendNewVersion(NewVersionAvailable $event): void
{ {
$sendMail = app('fireflyconfig')->get('notification_new_version', true)->data; $sendMail = FireflyConfig::get('notification_new_version', true)->data;
if (false === $sendMail) { if (false === $sendMail) {
return; return;
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use FireflyIII\Enums\WebhookTrigger; use FireflyIII\Enums\WebhookTrigger;
use FireflyIII\Events\Model\TransactionGroup\TriggeredStoredTransactionGroup;
use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Events\RequestedSendWebhookMessages;
use FireflyIII\Events\StoredTransactionGroup; use FireflyIII\Events\StoredTransactionGroup;
use FireflyIII\Generator\Webhook\MessageGeneratorInterface; use FireflyIII\Generator\Webhook\MessageGeneratorInterface;
@@ -51,6 +52,12 @@ class StoredGroupEventHandler
$this->removePeriodStatistics($event); $this->removePeriodStatistics($event);
} }
public function triggerRulesManually(TriggeredStoredTransactionGroup $event): void
{
$newEvent = new StoredTransactionGroup($event->transactionGroup, true, false);
$this->processRules($newEvent);
}
/** /**
* This method grabs all the users rules and processes them. * This method grabs all the users rules and processes them.
*/ */

View File

@@ -57,6 +57,7 @@ use Illuminate\Auth\Events\Login;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UserEventHandler. * Class UserEventHandler.
@@ -224,7 +225,7 @@ class UserEventHandler
public function sendAdminRegistrationNotification(RegisteredUser $event): void public function sendAdminRegistrationNotification(RegisteredUser $event): void
{ {
$sendMail = (bool)app('fireflyconfig')->get('notification_admin_new_reg', true)->data; $sendMail = (bool)FireflyConfig::get('notification_admin_new_reg', true)->data;
if ($sendMail) { if ($sendMail) {
$owner = $event->owner; $owner = $event->owner;
@@ -367,7 +368,7 @@ class UserEventHandler
*/ */
public function sendRegistrationMail(RegisteredUser $event): void public function sendRegistrationMail(RegisteredUser $event): void
{ {
$sendMail = (bool)app('fireflyconfig')->get('notification_user_new_reg', true)->data; $sendMail = (bool)FireflyConfig::get('notification_user_new_reg', true)->data;
if ($sendMail) { if ($sendMail) {
try { try {
Notification::send($event->user, new UserRegistrationNotification()); Notification::send($event->user, new UserRegistrationNotification());

View File

@@ -33,6 +33,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class VersionCheckEventHandler * Class VersionCheckEventHandler
@@ -54,7 +55,7 @@ class VersionCheckEventHandler
Log::debug('Now in checkForUpdates()'); Log::debug('Now in checkForUpdates()');
// should not check for updates: // should not check for updates:
$permission = app('fireflyconfig')->get('permission_update_check', -1); $permission = FireflyConfig::get('permission_update_check', -1);
$value = (int) $permission->data; $value = (int) $permission->data;
if (1 !== $value) { if (1 !== $value) {
Log::debug('Update check is not enabled.'); Log::debug('Update check is not enabled.');
@@ -73,7 +74,7 @@ class VersionCheckEventHandler
} }
/** @var Configuration $lastCheckTime */ /** @var Configuration $lastCheckTime */
$lastCheckTime = app('fireflyconfig')->get('last_update_check', Carbon::now()->getTimestamp()); $lastCheckTime = FireflyConfig::get('last_update_check', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp(); $now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data; $diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last check time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff)); Log::debug(sprintf('Last check time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -87,7 +88,7 @@ class VersionCheckEventHandler
$release = $this->getLatestRelease(); $release = $this->getLatestRelease();
session()->flash($release['level'], $release['message']); session()->flash($release['level'], $release['message']);
app('fireflyconfig')->set('last_update_check', Carbon::now()->getTimestamp()); FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp());
} }
/** /**
@@ -107,7 +108,7 @@ class VersionCheckEventHandler
} }
/** @var Configuration $lastCheckTime */ /** @var Configuration $lastCheckTime */
$lastCheckTime = app('fireflyconfig')->get('last_update_warning', Carbon::now()->getTimestamp()); $lastCheckTime = FireflyConfig::get('last_update_warning', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp(); $now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data; $diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last warning time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff)); Log::debug(sprintf('Last warning time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -120,6 +121,6 @@ class VersionCheckEventHandler
Log::debug('Have warned about a new version in four weeks!'); Log::debug('Have warned about a new version in four weeks!');
session()->flash('info', (string) trans('firefly.disabled_but_check')); session()->flash('info', (string) trans('firefly.disabled_but_check'));
app('fireflyconfig')->set('last_update_warning', Carbon::now()->getTimestamp()); FireflyConfig::set('last_update_warning', Carbon::now()->getTimestamp());
} }
} }

View File

@@ -27,6 +27,7 @@ namespace FireflyIII\Handlers\Events;
use FireflyIII\Jobs\SendWebhookMessage; use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\WebhookMessage; use FireflyIII\Models\WebhookMessage;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class WebhookEventHandler * Class WebhookEventHandler
@@ -39,7 +40,7 @@ class WebhookEventHandler
public function sendWebhookMessages(): void public function sendWebhookMessages(): void
{ {
Log::debug(sprintf('Now in %s', __METHOD__)); Log::debug(sprintf('Now in %s', __METHOD__));
if (false === config('firefly.feature_flags.webhooks') || false === config('firefly.allow_webhooks')) { if (false === config('firefly.feature_flags.webhooks') || false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::debug('Webhook event handler is disabled, do not run sendWebhookMessages().'); Log::debug('Webhook event handler is disabled, do not run sendWebhookMessages().');
return; return;
@@ -53,8 +54,13 @@ class WebhookEventHandler
)->splice(0, 5) )->splice(0, 5)
; ;
Log::debug(sprintf('Found %d webhook message(s) ready to be send.', $messages->count())); Log::debug(sprintf('Found %d webhook message(s) ready to be send.', $messages->count()));
/** @var WebhookMessage $message */
foreach ($messages as $message) { foreach ($messages as $message) {
if (false === $message->sent) { if (false === $message->sent) {
// set it to "sent" right away!
$message->sent = true;
$message->save();
Log::debug(sprintf('Send message #%d', $message->id)); Log::debug(sprintf('Send message #%d', $message->id));
SendWebhookMessage::dispatch($message)->afterResponse(); SendWebhookMessage::dispatch($message)->afterResponse();
} }

View File

@@ -52,7 +52,7 @@ class AccountObserver
if (!Amount::convertToPrimary($account->user)) { if (!Amount::convertToPrimary($account->user)) {
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($account->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($account->user->userGroup);
$repository = app(AccountRepositoryInterface::class); $repository = app(AccountRepositoryInterface::class);
$currency = $repository->getAccountCurrency($account); $currency = $repository->getAccountCurrency($account);
if (null !== $currency && $currency->id !== $userCurrency->id && '' !== (string) $account->virtual_balance && 0 !== bccomp($account->virtual_balance, '0')) { if (null !== $currency && $currency->id !== $userCurrency->id && '' !== (string) $account->virtual_balance && 0 !== bccomp($account->virtual_balance, '0')) {

View File

@@ -42,7 +42,7 @@ class AutoBudgetObserver
if (!Amount::convertToPrimary($autoBudget->budget->user)) { if (!Amount::convertToPrimary($autoBudget->budget->user)) {
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($autoBudget->budget->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($autoBudget->budget->user->userGroup);
$autoBudget->native_amount = null; $autoBudget->native_amount = null;
if ($autoBudget->transactionCurrency->id !== $userCurrency->id) { if ($autoBudget->transactionCurrency->id !== $userCurrency->id) {
$converter = new ExchangeRateConverter(); $converter = new ExchangeRateConverter();

View File

@@ -44,7 +44,7 @@ class AvailableBudgetObserver
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($availableBudget->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($availableBudget->user->userGroup);
$availableBudget->native_amount = null; $availableBudget->native_amount = null;
if ($availableBudget->transactionCurrency->id !== $userCurrency->id) { if ($availableBudget->transactionCurrency->id !== $userCurrency->id) {
$converter = new ExchangeRateConverter(); $converter = new ExchangeRateConverter();

View File

@@ -46,7 +46,7 @@ class BillObserver
if (!Amount::convertToPrimary($bill->user)) { if (!Amount::convertToPrimary($bill->user)) {
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($bill->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($bill->user->userGroup);
$bill->native_amount_min = null; $bill->native_amount_min = null;
$bill->native_amount_max = null; $bill->native_amount_max = null;
if ($bill->transactionCurrency->id !== $userCurrency->id) { if ($bill->transactionCurrency->id !== $userCurrency->id) {

View File

@@ -72,7 +72,7 @@ class BudgetLimitObserver
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($budgetLimit->budget->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($budgetLimit->budget->user->userGroup);
$budgetLimit->native_amount = null; $budgetLimit->native_amount = null;
if ($budgetLimit->transactionCurrency->id !== $userCurrency->id) { if ($budgetLimit->transactionCurrency->id !== $userCurrency->id) {
$converter = new ExchangeRateConverter(); $converter = new ExchangeRateConverter();

View File

@@ -48,7 +48,7 @@ class PiggyBankEventObserver
if (!Amount::convertToPrimary($user)) { if (!Amount::convertToPrimary($user)) {
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($event->piggyBank->accounts()->first()->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($event->piggyBank->accounts()->first()->user->userGroup);
$event->native_amount = null; $event->native_amount = null;
if ($event->piggyBank->transactionCurrency->id !== $userCurrency->id) { if ($event->piggyBank->transactionCurrency->id !== $userCurrency->id) {
$converter = new ExchangeRateConverter(); $converter = new ExchangeRateConverter();

View File

@@ -49,7 +49,7 @@ class PiggyBankObserver
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($group); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($group);
$piggyBank->native_target_amount = null; $piggyBank->native_target_amount = null;
if ($piggyBank->transactionCurrency->id !== $userCurrency->id) { if ($piggyBank->transactionCurrency->id !== $userCurrency->id) {
$converter = new ExchangeRateConverter(); $converter = new ExchangeRateConverter();

View File

@@ -28,6 +28,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Http\Api\ExchangeRateConverter; use FireflyIII\Support\Http\Api\ExchangeRateConverter;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class TransactionObserver * Class TransactionObserver
@@ -39,7 +40,7 @@ class TransactionObserver
public function created(Transaction $transaction): void public function created(Transaction $transaction): void
{ {
Log::debug('Observe "created" of a transaction.'); Log::debug('Observe "created" of a transaction.');
if (true === config('firefly.feature_flags.running_balance_column') && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) {
Log::debug('Trigger recalculateForJournal'); Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal); AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
} }
@@ -51,7 +52,7 @@ class TransactionObserver
if (!Amount::convertToPrimary($transaction->transactionJournal->user)) { if (!Amount::convertToPrimary($transaction->transactionJournal->user)) {
return; return;
} }
$userCurrency = app('amount')->getPrimaryCurrencyByUserGroup($transaction->transactionJournal->user->userGroup); $userCurrency = \FireflyIII\Support\Facades\Amount::getPrimaryCurrencyByUserGroup($transaction->transactionJournal->user->userGroup);
$transaction->native_amount = null; $transaction->native_amount = null;
$transaction->native_foreign_amount = null; $transaction->native_foreign_amount = null;
// first normal amount // first normal amount
@@ -82,7 +83,7 @@ class TransactionObserver
public function updated(Transaction $transaction): void public function updated(Transaction $transaction): void
{ {
// Log::debug('Observe "updated" of a transaction.'); // Log::debug('Observe "updated" of a transaction.');
if (true === config('firefly.feature_flags.running_balance_column') && self::$recalculate && 1 === bccomp($transaction->amount, '0')) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && self::$recalculate && 1 === bccomp($transaction->amount, '0')) {
Log::debug('Trigger recalculateForJournal'); Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal); AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
} }

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Collector\Extensions;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use FireflyIII\Support\Facades\Steam;
/** /**
* Trait AmountCollection * Trait AmountCollection
@@ -39,7 +40,7 @@ trait AmountCollection
{ {
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->where('source.amount', app('steam')->negative($amount)); $q->where('source.amount', Steam::negative($amount));
} }
); );
@@ -50,7 +51,7 @@ trait AmountCollection
{ {
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->where('source.amount', '!=', app('steam')->negative($amount)); $q->where('source.amount', '!=', Steam::negative($amount));
} }
); );
@@ -64,7 +65,7 @@ trait AmountCollection
{ {
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->where('destination.amount', '<=', app('steam')->positive($amount)); $q->where('destination.amount', '<=', Steam::positive($amount));
} }
); );
@@ -78,7 +79,7 @@ trait AmountCollection
{ {
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->where('destination.amount', '>=', app('steam')->positive($amount)); $q->where('destination.amount', '>=', Steam::positive($amount));
} }
); );
@@ -93,7 +94,7 @@ trait AmountCollection
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->whereNotNull('source.foreign_amount'); $q->whereNotNull('source.foreign_amount');
$q->where('source.foreign_amount', app('steam')->negative($amount)); $q->where('source.foreign_amount', Steam::negative($amount));
} }
); );
@@ -108,7 +109,7 @@ trait AmountCollection
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->whereNull('source.foreign_amount'); $q->whereNull('source.foreign_amount');
$q->orWhere('source.foreign_amount', '!=', app('steam')->negative($amount)); $q->orWhere('source.foreign_amount', '!=', Steam::negative($amount));
} }
); );
@@ -123,7 +124,7 @@ trait AmountCollection
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->whereNotNull('destination.foreign_amount'); $q->whereNotNull('destination.foreign_amount');
$q->where('destination.foreign_amount', '<=', app('steam')->positive($amount)); $q->where('destination.foreign_amount', '<=', Steam::positive($amount));
} }
); );
@@ -138,7 +139,7 @@ trait AmountCollection
$this->query->where( $this->query->where(
static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line static function (EloquentBuilder $q) use ($amount): void { // @phpstan-ignore-line
$q->whereNotNull('destination.foreign_amount'); $q->whereNotNull('destination.foreign_amount');
$q->where('destination.foreign_amount', '>=', app('steam')->positive($amount)); $q->where('destination.foreign_amount', '>=', Steam::positive($amount));
} }
); );

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Report; namespace FireflyIII\Helpers\Report;
use FireflyIII\Support\Facades\Navigation;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
@@ -81,7 +82,7 @@ class ReportHelper implements ReportHelperInterface
/** @var Carbon $expectedStart */ /** @var Carbon $expectedStart */
foreach ($expectedDates as $expectedStart) { foreach ($expectedDates as $expectedStart) {
$expectedEnd = app('navigation')->endOfX($expectedStart, $bill->repeat_freq, null); $expectedEnd = Navigation::endOfX($expectedStart, $bill->repeat_freq, null);
// is paid in this period maybe? // is paid in this period maybe?
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Update;
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface; use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Trait UpdateTrait * Trait UpdateTrait
@@ -43,7 +44,7 @@ trait UpdateTrait
/** @var UpdateRequestInterface $checker */ /** @var UpdateRequestInterface $checker */
$checker = app(UpdateRequestInterface::class); $checker = app(UpdateRequestInterface::class);
$channelConfig = app('fireflyconfig')->get('update_channel', 'stable'); $channelConfig = FireflyConfig::get('update_channel', 'stable');
$channel = (string) $channelConfig->data; $channel = (string) $channelConfig->data;
return $checker->getUpdateInformation($channel); return $checker->getUpdateInformation($channel);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
@@ -141,18 +142,18 @@ class CreateController extends Controller
$data = $request->getAccountData(); $data = $request->getAccountData();
$account = $this->repository->store($data); $account = $this->repository->store($data);
$request->session()->flash('success', (string) trans('firefly.stored_new_account', ['name' => $account->name])); $request->session()->flash('success', (string) trans('firefly.stored_new_account', ['name' => $account->name]));
app('preferences')->mark(); Preferences::mark();
Log::channel('audit')->info('Stored new account.', $data); Log::channel('audit')->info('Stored new account.', $data);
// update preferences if necessary: // update preferences if necessary:
$frontpage = app('preferences')->get('frontpageAccounts', [])->data; $frontpage = Preferences::get('frontpageAccounts', [])->data;
if (!is_array($frontpage)) { if (!is_array($frontpage)) {
$frontpage = []; $frontpage = [];
} }
if (AccountTypeEnum::ASSET->value === $account->accountType->type) { if (AccountTypeEnum::ASSET->value === $account->accountType->type) {
$frontpage[] = $account->id; $frontpage[] = $account->id;
app('preferences')->set('frontpageAccounts', $frontpage); Preferences::set('frontpageAccounts', $frontpage);
} }
// store attachment(s): // store attachment(s):

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
@@ -101,7 +102,7 @@ class DeleteController extends Controller
$this->repository->destroy($account, $moveTo); $this->repository->destroy($account, $moveTo);
$request->session()->flash('success', (string) trans(sprintf('firefly.%s_deleted', $typeName), ['name' => $name])); $request->session()->flash('success', (string) trans(sprintf('firefly.%s_deleted', $typeName), ['name' => $name]));
app('preferences')->mark(); Preferences::mark();
return redirect($this->getPreviousUrl('accounts.delete.url')); return redirect($this->getPreviousUrl('accounts.delete.url'));
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\AccountFormRequest; use FireflyIII\Http\Requests\AccountFormRequest;
@@ -37,6 +38,7 @@ use Illuminate\Http\Request;
use Illuminate\Routing\Redirector; use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use FireflyIII\Support\Facades\Steam;
/** /**
* Class EditController * Class EditController
@@ -147,9 +149,9 @@ class EditController extends Controller
'BIC' => $repository->getMetaValue($account, 'BIC'), 'BIC' => $repository->getMetaValue($account, 'BIC'),
'opening_balance_date' => substr((string) $openingBalanceDate, 0, 10), 'opening_balance_date' => substr((string) $openingBalanceDate, 0, 10),
'liability_type_id' => $account->account_type_id, 'liability_type_id' => $account->account_type_id,
'opening_balance' => app('steam')->bcround($openingBalanceAmount, $currency->decimal_places), 'opening_balance' => Steam::bcround($openingBalanceAmount, $currency->decimal_places),
'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'), 'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'),
'virtual_balance' => app('steam')->bcround($virtualBalance, $currency->decimal_places), 'virtual_balance' => Steam::bcround($virtualBalance, $currency->decimal_places),
'currency_id' => $currency->id, 'currency_id' => $currency->id,
'include_net_worth' => $hasOldInput ? (bool) $request->old('include_net_worth') : $includeNetWorth, 'include_net_worth' => $hasOldInput ? (bool) $request->old('include_net_worth') : $includeNetWorth,
'interest' => $repository->getMetaValue($account, 'interest'), 'interest' => $repository->getMetaValue($account, 'interest'),
@@ -205,7 +207,7 @@ class EditController extends Controller
$redirect = redirect(route('accounts.edit', [$account->id]))->withInput(['return_to_edit' => 1]); $redirect = redirect(route('accounts.edit', [$account->id]))->withInput(['return_to_edit' => 1]);
} }
app('preferences')->mark(); Preferences::mark();
return $redirect; return $redirect;
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
@@ -81,7 +82,7 @@ class IndexController extends Controller
$collection = $this->repository->getInactiveAccountsByType($types); $collection = $this->repository->getInactiveAccountsByType($types);
$total = $collection->count(); $total = $collection->count();
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page'); $page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) Preferences::get('listPageSize', 50)->data;
$accounts = $collection->slice(($page - 1) * $pageSize, $pageSize); $accounts = $collection->slice(($page - 1) * $pageSize, $pageSize);
unset($collection); unset($collection);
@@ -153,7 +154,7 @@ class IndexController extends Controller
$collection = $this->repository->getActiveAccountsByType($types); $collection = $this->repository->getActiveAccountsByType($types);
$total = $collection->count(); $total = $collection->count();
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page'); $page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) Preferences::get('listPageSize', 50)->data;
$accounts = $collection->slice(($page - 1) * $pageSize, $pageSize); $accounts = $collection->slice(($page - 1) * $pageSize, $pageSize);
$inactiveCount = $this->repository->getInactiveAccountsByType($types)->count(); $inactiveCount = $this->repository->getInactiveAccountsByType($types)->count();
@@ -167,12 +168,17 @@ class IndexController extends Controller
/** @var Carbon $end */ /** @var Carbon $end */
$end = clone session('end', today(config('app.timezone'))->endOfMonth()); $end = clone session('end', today(config('app.timezone'))->endOfMonth());
$now = now();
if ($now->gt($end) || $now->lt($start)) {
$now = $end;
}
$ids = $accounts->pluck('id')->toArray(); $ids = $accounts->pluck('id')->toArray();
Log::debug(sprintf('index: accountsBalancesInRange("%s", "%s")', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s'))); Log::debug(sprintf('index: accountsBalancesInRange("%s", "%s")', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
[ [
$startBalances, $startBalances,
$endBalances, $endBalances,
] = Steam::accountsBalancesInRange($accounts, $start, $end, $this->primaryCurrency, $this->convertToPrimary); ] = Steam::accountsBalancesInRange($accounts, $start, $now, $this->primaryCurrency, $this->convertToPrimary);
$activities = Steam::getLastActivities($ids); $activities = Steam::getLastActivities($ids);

View File

@@ -23,6 +23,8 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Support\Facades\Navigation;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
@@ -91,20 +93,20 @@ class ReconcileController extends Controller
$currency = $this->accountRepos->getAccountCurrency($account) ?? $this->primaryCurrency; $currency = $this->accountRepos->getAccountCurrency($account) ?? $this->primaryCurrency;
// no start or end: // no start or end:
$range = app('navigation')->getViewRange(false); $range = Navigation::getViewRange(false);
// get start and end // get start and end
if (!$start instanceof Carbon && !$end instanceof Carbon) { if (!$start instanceof Carbon && !$end instanceof Carbon) {
/** @var Carbon $start */ /** @var Carbon $start */
$start = clone session('start', app('navigation')->startOfPeriod(new Carbon(), $range)); $start = clone session('start', Navigation::startOfPeriod(new Carbon(), $range));
/** @var Carbon $end */ /** @var Carbon $end */
$end = clone session('end', app('navigation')->endOfPeriod(new Carbon(), $range)); $end = clone session('end', Navigation::endOfPeriod(new Carbon(), $range));
} }
if (null === $end) { if (null === $end) {
/** @var Carbon $end */ /** @var Carbon $end */
$end = app('navigation')->endOfPeriod($start, $range); $end = Navigation::endOfPeriod($start, $range);
} }
if ($end->lt($start)) { if ($end->lt($start)) {
@@ -174,7 +176,7 @@ class ReconcileController extends Controller
$result = $this->createReconciliation($account, $start, $end, $data['difference']); $result = $this->createReconciliation($account, $start, $end, $data['difference']);
} }
Log::debug('End of routine.'); Log::debug('End of routine.');
app('preferences')->mark(); Preferences::mark();
if ('' === $result) { if ('' === $result) {
session()->flash('success', (string) trans('firefly.reconciliation_stored')); session()->flash('success', (string) trans('firefly.reconciliation_stored'));
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Support\Facades\Preferences;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
@@ -113,7 +114,7 @@ class ShowController extends Controller
$today = today(config('app.timezone')); $today = today(config('app.timezone'));
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type)); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type));
$page = (int) $request->get('page'); $page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) Preferences::get('listPageSize', 50)->data;
$accountCurrency = $this->repository->getAccountCurrency($account); $accountCurrency = $this->repository->getAccountCurrency($account);
$currency = $accountCurrency ?? $this->primaryCurrency; $currency = $accountCurrency ?? $this->primaryCurrency;
$fStart = $start->isoFormat($this->monthAndDayFormat); $fStart = $start->isoFormat($this->monthAndDayFormat);
@@ -164,7 +165,7 @@ class ShowController extends Controller
$timer->stop('collection'); $timer->stop('collection');
$groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')])); $groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
$showAll = false; $showAll = false;
$now = today()->endOfDay(); $now = now();
if ($now->gt($end) || $now->lt($start)) { if ($now->gt($end) || $now->lt($start)) {
$now = $end; $now = $end;
} }
@@ -173,10 +174,7 @@ class ShowController extends Controller
$balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $now)[$account->id]; $balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $now)[$account->id];
// $balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $now), $account, $this->convertToPrimary, $accountCurrency); // $balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $now), $account, $this->convertToPrimary, $accountCurrency);
return view( return view('accounts.show', ['account' => $account, 'showAll' => $showAll, 'objectType' => $objectType, 'currency' => $currency, 'today' => $today, 'periods' => $periods, 'subTitleIcon' => $subTitleIcon, 'groups' => $groups, 'attachments' => $attachments, 'subTitle' => $subTitle, 'start' => $start, 'end' => $end, 'chartUrl' => $chartUrl, 'location' => $location, 'balances' => $balances]);
'accounts.show',
['account' => $account, 'showAll' => $showAll, 'objectType' => $objectType, 'currency' => $currency, 'today' => $today, 'periods' => $periods, 'subTitleIcon' => $subTitleIcon, 'groups' => $groups, 'attachments' => $attachments, 'subTitle' => $subTitle, 'start' => $start, 'end' => $end, 'chartUrl' => $chartUrl, 'location' => $location, 'balances' => $balances]
);
} }
/** /**
@@ -202,7 +200,7 @@ class ShowController extends Controller
$start = $this->repository->oldestJournalDate($account) ?? today(config('app.timezone'))->startOfMonth(); $start = $this->repository->oldestJournalDate($account) ?? today(config('app.timezone'))->startOfMonth();
$subTitleIcon = config('firefly.subIconsByIdentifier.'.$account->accountType->type); $subTitleIcon = config('firefly.subIconsByIdentifier.'.$account->accountType->type);
$page = (int) $request->get('page'); $page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) Preferences::get('listPageSize', 50)->data;
$currency = $this->repository->getAccountCurrency($account) ?? $this->primaryCurrency; $currency = $this->repository->getAccountCurrency($account) ?? $this->primaryCurrency;
$subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]); $subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]);
$periods = new Collection(); $periods = new Collection();
@@ -224,14 +222,16 @@ class ShowController extends Controller
// correct // correct
Log::debug(sprintf('showAll: Call accountsBalancesOptimized with date/time "%s"', $end->toIso8601String())); Log::debug(sprintf('showAll: Call accountsBalancesOptimized with date/time "%s"', $end->toIso8601String()));
$now = now();
if ($now->gt($end) || $now->lt($start)) {
$now = $end;
}
// 2025-10-08 replace finalAccountBalance with accountsBalancesOptimized. // 2025-10-08 replace finalAccountBalance with accountsBalancesOptimized.
// $balances = Steam::finalAccountBalance($account, $end); // $balances = Steam::finalAccountBalance($account, $end);
// $balances = Steam::filterAccountBalance($balances, $account, $this->convertToPrimary, $accountCurrency); // $balances = Steam::filterAccountBalance($balances, $account, $this->convertToPrimary, $accountCurrency);
$balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id]; $balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $now)[$account->id];
return view( return view('accounts.show', ['account' => $account, 'showAll' => $showAll, 'location' => $location, 'objectType' => $objectType, 'isLiability' => $isLiability, 'attachments' => $attachments, 'currency' => $currency, 'today' => $today, 'chartUrl' => $chartUrl, 'periods' => $periods, 'subTitleIcon' => $subTitleIcon, 'groups' => $groups, 'subTitle' => $subTitle, 'start' => $start, 'end' => $end, 'balances' => $balances]);
'accounts.show',
['account' => $account, 'showAll' => $showAll, 'location' => $location, 'objectType' => $objectType, 'isLiability' => $isLiability, 'attachments' => $attachments, 'currency' => $currency, 'today' => $today, 'chartUrl' => $chartUrl, 'periods' => $periods, 'subTitleIcon' => $subTitleIcon, 'groups' => $groups, 'subTitle' => $subTitle, 'start' => $start, 'end' => $end, 'balances' => $balances]
);
} }
} }

View File

@@ -27,6 +27,7 @@ use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Requests\ConfigurationRequest; use FireflyIII\Http\Requests\ConfigurationRequest;
use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\Support\Facades\FireflyConfig;
use FireflyIII\Support\Facades\Preferences;
use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
@@ -73,9 +74,28 @@ class ConfigurationController extends Controller
$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data; $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$siteOwner = config('firefly.site_owner'); $siteOwner = config('firefly.site_owner');
$enableExchangeRates = FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$useRunningBalance = FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data;
$enableExternalMap = FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
$enableExternalRates = FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data;
$allowWebhooks = FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data;
$validUrlProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return view( return view(
'settings.configuration.index', 'settings.configuration.index',
['subTitle' => $subTitle, 'subTitleIcon' => $subTitleIcon, 'singleUserMode' => $singleUserMode, 'isDemoSite' => $isDemoSite, 'siteOwner' => $siteOwner] [
'subTitle' => $subTitle,
'subTitleIcon' => $subTitleIcon,
'singleUserMode' => $singleUserMode,
'isDemoSite' => $isDemoSite,
'siteOwner' => $siteOwner,
'enableExchangeRates' => $enableExchangeRates,
'useRunningBalance' => $useRunningBalance,
'enableExternalMap' => $enableExternalMap,
'enableExternalRates' => $enableExternalRates,
'allowWebhooks' => $allowWebhooks,
'validUrlProtocols' => $validUrlProtocols,
]
); );
} }
@@ -91,11 +111,20 @@ class ConfigurationController extends Controller
// store config values // store config values
FireflyConfig::set('single_user_mode', $data['single_user_mode']); FireflyConfig::set('single_user_mode', $data['single_user_mode']);
FireflyConfig::set('enable_exchange_rates', $data['enable_exchange_rates']);
FireflyConfig::set('use_running_balance', $data['use_running_balance']);
FireflyConfig::set('enable_external_map', $data['enable_external_map']);
FireflyConfig::set('enable_external_rates', $data['enable_external_rates']);
FireflyConfig::set('allow_webhooks', $data['allow_webhooks']);
FireflyConfig::set('valid_url_protocols', $data['valid_url_protocols']);
FireflyConfig::set('is_demo_site', $data['is_demo_site']); FireflyConfig::set('is_demo_site', $data['is_demo_site']);
// flash message // flash message
session()->flash('success', (string)trans('firefly.configuration_updated')); session()->flash('success', (string)trans('firefly.configuration_updated'));
app('preferences')->mark(); Preferences::mark();
return redirect()->route('settings.configuration.index'); return redirect()->route('settings.configuration.index');
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\Factory;
@@ -59,7 +60,7 @@ class HomeController extends Controller
$title = (string) trans('firefly.system_settings'); $title = (string) trans('firefly.system_settings');
$mainTitleIcon = 'fa-hand-spock-o'; $mainTitleIcon = 'fa-hand-spock-o';
$email = auth()->user()->email; $email = auth()->user()->email;
$pref = app('preferences')->get('remote_guard_alt_email'); $pref = Preferences::get('remote_guard_alt_email');
if (null !== $pref && is_string($pref->data)) { if (null !== $pref && is_string($pref->data)) {
$email = $pref->data; $email = $pref->data;
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Requests\LinkTypeFormRequest; use FireflyIII\Http\Requests\LinkTypeFormRequest;
@@ -125,7 +126,7 @@ class LinkController extends Controller
$this->repository->destroy($linkType, $moveTo); $this->repository->destroy($linkType, $moveTo);
$request->session()->flash('success', (string) trans('firefly.deleted_link_type', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.deleted_link_type', ['name' => $name]));
app('preferences')->mark(); Preferences::mark();
return redirect($this->getPreviousUrl('link-types.delete.url')); return redirect($this->getPreviousUrl('link-types.delete.url'));
} }
@@ -245,7 +246,7 @@ class LinkController extends Controller
Log::channel('audit')->info(sprintf('User update link type #%d.', $linkType->id), $data); Log::channel('audit')->info(sprintf('User update link type #%d.', $linkType->id), $data);
$request->session()->flash('success', (string) trans('firefly.updated_link_type', ['name' => $linkType->name])); $request->session()->flash('success', (string) trans('firefly.updated_link_type', ['name' => $linkType->name]));
app('preferences')->mark(); Preferences::mark();
$redirect = redirect($this->getPreviousUrl('link-types.edit.url')); $redirect = redirect($this->getPreviousUrl('link-types.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
// set value so edit routine will not overwrite URL: // set value so edit routine will not overwrite URL:

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Support\Facades\Preferences;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Events\Admin\InvitationCreated; use FireflyIII\Events\Admin\InvitationCreated;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -41,6 +42,7 @@ use Illuminate\Routing\Redirector;
use Illuminate\View\View; use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UserController. * Class UserController.
@@ -163,7 +165,7 @@ class UserController extends Controller
$subTitle = (string) trans('firefly.user_administration'); $subTitle = (string) trans('firefly.user_administration');
$subTitleIcon = 'fa-users'; $subTitleIcon = 'fa-users';
$users = $this->repository->all(); $users = $this->repository->all();
$singleUserMode = (bool) app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = (bool) FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$allowInvites = false; $allowInvites = false;
if (!$this->externalIdentity && $singleUserMode) { if (!$this->externalIdentity && $singleUserMode) {
// also registration enabled. // also registration enabled.
@@ -242,7 +244,7 @@ class UserController extends Controller
$this->repository->updateEmail($user, $data['email']); $this->repository->updateEmail($user, $data['email']);
session()->flash('success', (string) trans('firefly.updated_user', ['email' => $user->email])); session()->flash('success', (string) trans('firefly.updated_user', ['email' => $user->email]));
app('preferences')->mark(); Preferences::mark();
$redirect = redirect($this->getPreviousUrl('users.edit.url')); $redirect = redirect($this->getPreviousUrl('users.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
session()->put('users.edit.fromUpdate', true); session()->put('users.edit.fromUpdate', true);

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Requests\AttachmentFormRequest; use FireflyIII\Http\Requests\AttachmentFormRequest;
use FireflyIII\Models\Attachment; use FireflyIII\Models\Attachment;
@@ -85,7 +86,7 @@ class AttachmentController extends Controller
$this->repository->destroy($attachment); $this->repository->destroy($attachment);
$request->session()->flash('success', (string) trans('firefly.attachment_deleted', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.attachment_deleted', ['name' => $name]));
app('preferences')->mark(); Preferences::mark();
return redirect($this->getPreviousUrl('attachments.delete.url')); return redirect($this->getPreviousUrl('attachments.delete.url'));
} }
@@ -175,7 +176,7 @@ class AttachmentController extends Controller
$this->repository->update($attachment, $data); $this->repository->update($attachment, $data);
$request->session()->flash('success', (string) trans('firefly.attachment_updated', ['name' => $attachment->filename])); $request->session()->flash('success', (string) trans('firefly.attachment_updated', ['name' => $attachment->filename]));
app('preferences')->mark(); Preferences::mark();
$redirect = redirect($this->getPreviousUrl('attachments.edit.url')); $redirect = redirect($this->getPreviousUrl('attachments.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {

View File

@@ -36,6 +36,7 @@ use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException; use Safe\Exceptions\UrlException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url; use function Safe\parse_url;
@@ -142,7 +143,7 @@ class ForgotPasswordController extends Controller
} }
// is allowed to? // is allowed to?
$singleUserMode = app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$userCount = User::count(); $userCount = User::count();
$allowRegistration = true; $allowRegistration = true;
$pageTitle = (string) trans('firefly.forgot_pw_page_title'); $pageTitle = (string) trans('firefly.forgot_pw_page_title');

Some files were not shown because too many files have changed in this diff Show More