Compare commits

...

418 Commits

Author SHA1 Message Date
James Cole
07aeb6cd20 Merge branch 'release/v6.0.18' 2023-07-18 07:01:55 +02:00
James Cole
d17cc15037 Meta files for new release 2023-07-18 07:00:10 +02:00
James Cole
efade857bb Fix https://github.com/firefly-iii/firefly-iii/issues/7694 2023-07-18 06:44:58 +02:00
James Cole
15ac6a1195 Fix https://github.com/firefly-iii/firefly-iii/issues/7706 2023-07-18 06:38:11 +02:00
James Cole
a45a050e7d Fix https://github.com/firefly-iii/firefly-iii/issues/7749 2023-07-18 06:30:45 +02:00
James Cole
e435ff8b1c Remove debug, add fix for https://github.com/orgs/firefly-iii/discussions/7655#discussioncomment-6468397 2023-07-18 06:18:04 +02:00
James Cole
788dae1477 fix: notifications 2023-07-17 20:33:26 +02:00
James Cole
2bb4cc7954 Fix: add route 2023-07-17 20:26:47 +02:00
James Cole
ecead8a27b Another attempt to fix Slack 2023-07-17 20:15:47 +02:00
James Cole
4a2681df14 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
# Conflicts:
#	composer.json
#	composer.lock
2023-07-17 19:19:34 +02:00
James Cole
5761d82635 Fix: package upgrade for slack messages 2023-07-17 19:18:30 +02:00
James Cole
36fce9db4e Merge pull request #7756 from firefly-iii/dependabot/composer/develop/laravel/slack-notification-channel-3.0.0 2023-07-17 05:41:16 +02:00
dependabot[bot]
1227574bc1 chore(deps): bump laravel/slack-notification-channel from 2.5.0 to 3.0.0
Bumps [laravel/slack-notification-channel](https://github.com/laravel/slack-notification-channel) from 2.5.0 to 3.0.0.
- [Release notes](https://github.com/laravel/slack-notification-channel/releases)
- [Changelog](https://github.com/laravel/slack-notification-channel/blob/3.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/slack-notification-channel/compare/v2.5.0...v3.0.0)

---
updated-dependencies:
- dependency-name: laravel/slack-notification-channel
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 03:15:24 +00:00
James Cole
47c2a66e1d Merge tag 'v6.0.17' into develop
v6.0.17
2023-07-15 16:05:38 +02:00
James Cole
c59e52bbbf Merge branch 'release/v6.0.17' 2023-07-15 16:05:36 +02:00
James Cole
81961fd632 Update packages. 2023-07-15 16:04:52 +02:00
James Cole
b557805eeb Code for new release 2023-07-15 16:02:42 +02:00
James Cole
f43b539470 Fix transfer validation for CAMT imports 2023-07-14 06:07:16 +02:00
James Cole
27037c2fbb Verify all fields are nullable. 2023-07-11 09:14:16 +02:00
James Cole
10646099a0 Add nullable types in validation. 2023-07-11 08:19:47 +02:00
James Cole
43ad63fac6 Merge branch 'main' into develop 2023-07-11 06:58:33 +02:00
James Cole
221c59437c Merge pull request #7745 from firefly-iii/dependabot/npm_and_yarn/semver-6.3.1
chore(deps): bump semver from 6.3.0 to 6.3.1
2023-07-11 06:33:14 +02:00
dependabot[bot]
1a94ec5bbe chore(deps): bump semver from 6.3.0 to 6.3.1
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 04:32:22 +00:00
James Cole
f57c554c56 Merge pull request #7743 from firefly-iii/dependabot/npm_and_yarn/frontend/semver-6.3.1
chore(deps): bump semver from 6.3.0 to 6.3.1 in /frontend
2023-07-11 06:30:48 +02:00
dependabot[bot]
334aec58a4 chore(deps): bump semver from 6.3.0 to 6.3.1 in /frontend
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 01:38:42 +00:00
James Cole
7035da4d75 Merge pull request #7738 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.25 2023-07-10 07:16:02 +02:00
James Cole
29a40ce8dd Merge pull request #7737 from firefly-iii/dependabot/composer/develop/laravel/passport-11.8.8 2023-07-10 06:47:00 +02:00
dependabot[bot]
c6c98c4df5 chore(deps-dev): bump phpstan/phpstan from 1.10.22 to 1.10.25
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.22 to 1.10.25.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.22...1.10.25)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:55:30 +00:00
dependabot[bot]
277d7e6650 chore(deps): bump laravel/passport from 11.8.7 to 11.8.8
Bumps [laravel/passport](https://github.com/laravel/passport) from 11.8.7 to 11.8.8.
- [Release notes](https://github.com/laravel/passport/releases)
- [Changelog](https://github.com/laravel/passport/blob/11.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/passport/compare/v11.8.7...v11.8.8)

---
updated-dependencies:
- dependency-name: laravel/passport
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:55:19 +00:00
James Cole
130c539006 Merge pull request #7736 from firefly-iii/dependabot/npm_and_yarn/develop/postcss-8.4.25 2023-07-10 05:51:11 +02:00
dependabot[bot]
2bdb2e12f0 chore(deps-dev): bump postcss from 8.4.24 to 8.4.25
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.25.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.25)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:11:56 +00:00
James Cole
25779206a1 fix: small issue with cache 2023-07-09 18:45:44 +02:00
James Cole
92f72a5ad7 Merge branch 'main' into develop 2023-07-08 06:40:47 +02:00
James Cole
4e041248ac Merge pull request #7724 from firefly-iii/dependabot/composer/league/oauth2-server-8.5.3 2023-07-07 05:45:52 +02:00
dependabot[bot]
8cc5aa8aba chore(deps): bump league/oauth2-server from 8.5.2 to 8.5.3
Bumps [league/oauth2-server](https://github.com/thephpleague/oauth2-server) from 8.5.2 to 8.5.3.
- [Release notes](https://github.com/thephpleague/oauth2-server/releases)
- [Changelog](https://github.com/thephpleague/oauth2-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/thephpleague/oauth2-server/compare/8.5.2...8.5.3)

---
updated-dependencies:
- dependency-name: league/oauth2-server
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 21:14:52 +00:00
James Cole
4ba712b24e Merge pull request #7717 from tonicospinelli/testing
Cover the startOfPeriod method of Navigation class
2023-07-04 19:32:02 +02:00
Antonio Spinelli
7af9169763 Cover the startOfPeriod method of Navigation class 2023-07-04 14:15:52 -03:00
James Cole
775504acb6 Chore: Add phpdocs 2023-07-04 13:29:19 +02:00
James Cole
7840e37e1a Merge pull request #7685 from tonicospinelli/testing
Create a Calendar Calculator and setup test suite
2023-07-04 13:13:29 +02:00
Antonio Spinelli
720fff4595 Fix typo, remove unused class and change the copyright author 2023-07-04 06:26:05 -03:00
Antonio Spinelli
551c1f4cda Send code coverage to SonarCloud 2023-07-03 15:45:32 -03:00
Antonio Spinelli
7f0db0de04 Organize test suites into unit and integration
This is the goals of project organization composing different
combinations to run any number of tests together.
2023-07-03 13:46:30 -03:00
Antonio Spinelli
6ac3cc384b Add Bimonthly periodicity for Support\Calendar 2023-07-03 13:46:30 -03:00
Antonio Spinelli
563879c218 Fix a bug for monthly calculation periodicity
This change reveals a bug in the Monthly calculation date where the
difference between more than one month was discarded. The new calendar
calculator was prepared to avoid overflow at the end of the month.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
dbb7ed3d5d Add the Calendar Calculator
It encapsulates some date operations like sum. The result will be the
calculated date when calling the nextDateByInterval method, given the
date, periodicity, and skipInterval parameters.

For example, given a date of 2019-12-31, monthly periodicity, and skip
interval 0, the results will be 2020-01-31. Also, if the skip interval
is 1, the result is 2020-02-29. This is because the next date will add
another month to the current range.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
4e3c2ba72c Calculate the next date using periodicity strategies.
All these strategies encapsulate how the Carbon library adds the
interval to the current date.

Monthly, Quarterly, Half-Yearly, and Yearly explicitly use the
overflow control to guarantee the end of the next month or year
adequately.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
8e911491f6 Add tests for Navigation
It is responsible for calculating and manipulating Dates in financial
organization is a very important feature, and requires significant
coverage.

The first test case is just to create an understanding of how it
works.
2023-07-03 13:46:29 -03:00
James Cole
03c5f3cc2d Merge pull request #7711 from firefly-iii/dependabot/composer/develop/spatie/laravel-ignition-2.2.0 2023-07-03 06:01:54 +02:00
dependabot[bot]
484565d600 chore(deps): bump spatie/laravel-ignition from 2.1.3 to 2.2.0
Bumps [spatie/laravel-ignition](https://github.com/spatie/laravel-ignition) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/spatie/laravel-ignition/releases)
- [Changelog](https://github.com/spatie/laravel-ignition/blob/main/CHANGELOG.md)
- [Commits](https://github.com/spatie/laravel-ignition/compare/2.1.3...2.2.0)

---
updated-dependencies:
- dependency-name: spatie/laravel-ignition
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 04:00:30 +00:00
James Cole
163a979227 Merge pull request #7712 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.22 2023-07-03 06:00:08 +02:00
James Cole
ed105fee1d Merge pull request #7713 from firefly-iii/dependabot/composer/develop/laravel/framework-10.14.1 2023-07-03 05:59:59 +02:00
James Cole
3b82cfa486 Merge pull request #7714 from firefly-iii/dependabot/composer/develop/nunomaduro/collision-7.7.0 2023-07-03 05:59:28 +02:00
dependabot[bot]
834e52eb2e chore(deps): bump nunomaduro/collision from 7.6.0 to 7.7.0
Bumps [nunomaduro/collision](https://github.com/nunomaduro/collision) from 7.6.0 to 7.7.0.
- [Changelog](https://github.com/nunomaduro/collision/blob/v7.x/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/collision/compare/v7.6.0...v7.7.0)

---
updated-dependencies:
- dependency-name: nunomaduro/collision
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:51 +00:00
dependabot[bot]
7eb938fe23 chore(deps): bump laravel/framework from 10.13.5 to 10.14.1
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.13.5 to 10.14.1.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.13.5...v10.14.1)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:47 +00:00
dependabot[bot]
8db7a4c47d chore(deps-dev): bump phpstan/phpstan from 1.10.21 to 1.10.22
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.21 to 1.10.22.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.21...1.10.22)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:37 +00:00
James Cole
b055a5d6af Fix #7704 2023-07-01 12:18:07 +02:00
James Cole
ad0a1b9a24 Add moar debug 2023-06-29 11:47:08 +02:00
James Cole
05d190659a More webhook debug 2023-06-29 11:35:46 +02:00
James Cole
9c6eaffba6 Better debug for webhooks 2023-06-29 11:34:34 +02:00
James Cole
3ee5e9aa04 Remove support for Heroku 2023-06-27 17:15:53 +02:00
James Cole
93a544fe53 Merge tag 'v6.0.16' into develop
v6.0.16
2023-06-27 15:02:07 +02:00
James Cole
3bc98bee20 Merge branch 'release/v6.0.16' 2023-06-27 15:02:06 +02:00
James Cole
f6302bc29b Update meta data for new release. 2023-06-27 15:01:42 +02:00
James Cole
43aa1704a9 Slight refactor in CSS fix. 2023-06-27 14:08:21 +02:00
James Cole
14fe82e361 fix: #7655 2023-06-26 06:10:16 +02:00
James Cole
33317c15a2 Merge branch 'develop' of https://github.com/firefly-iii/firefly-iii into develop 2023-06-26 06:09:10 +02:00
James Cole
ff1b56c5ef chore: update php cs fixer 2023-06-26 06:08:33 +02:00
James Cole
25e2063d70 Merge pull request #7690 from firefly-iii/dependabot/composer/develop/doctrine/dbal-3.6.4
chore(deps): bump doctrine/dbal from 3.6.3 to 3.6.4
2023-06-26 05:59:15 +02:00
James Cole
1d36c74934 Merge pull request #7689 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.21
chore(deps-dev): bump phpstan/phpstan from 1.10.20 to 1.10.21
2023-06-26 05:59:06 +02:00
James Cole
aebe7908f0 Merge pull request #7687 from MateusBMP/develop
Low contrast ratio on .skin-firefly-iii .btn-info color with dark theme
2023-06-26 05:58:34 +02:00
dependabot[bot]
3e2b881296 chore(deps): bump doctrine/dbal from 3.6.3 to 3.6.4
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 3.6.3 to 3.6.4.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/3.6.3...3.6.4)

---
updated-dependencies:
- dependency-name: doctrine/dbal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 03:56:30 +00:00
dependabot[bot]
c670a6991d chore(deps-dev): bump phpstan/phpstan from 1.10.20 to 1.10.21
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.20 to 1.10.21.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.20...1.10.21)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 03:56:24 +00:00
Mateus Pereira
f76a7d59e0 Updating .btn-info color to #fff (issue #7686) 2023-06-25 19:43:09 -03:00
James Cole
3d8bf3ec9b Fix #7683 2023-06-25 06:24:08 +02:00
Sander Dorigo
55e4479454 fix #7683 2023-06-24 21:00:05 +02:00
Sander Dorigo
436fe9fea4 Improve transaction validation 2023-06-24 08:27:28 +02:00
Sander Dorigo
63a7a4b03b New version 2023-06-23 11:07:50 +02:00
Sander Dorigo
0cab974048 Extended IBAN validation 2023-06-23 10:57:26 +02:00
James Cole
5fdcf37d06 Merge tag 'v6.0.15' into develop
v6.0.15
2023-06-21 13:13:11 +02:00
James Cole
4663fb2f12 Merge branch 'release/v6.0.15' 2023-06-21 13:13:10 +02:00
James Cole
e844ab592d Update meta data for release v6.0.15 2023-06-21 13:11:08 +02:00
James Cole
3dcb35710b chore: reformat code. 2023-06-21 12:34:58 +02:00
James Cole
8d87abde64 Fix https://github.com/firefly-iii/firefly-iii/issues/7678 2023-06-21 09:58:37 +02:00
James Cole
2b78485a61 Cleanup edit thing 2023-06-21 07:39:00 +02:00
James Cole
9d057b853f Rule edit form: rule group would always select the top one. 2023-06-21 07:30:08 +02:00
James Cole
bd269eaadf Merge tag 'v6.0.14' into develop
v6.0.14
2023-06-21 07:15:29 +02:00
James Cole
7096c65f50 Merge branch 'release/v6.0.14' 2023-06-21 07:15:28 +02:00
James Cole
1462b0de69 Update meta data for release 6.0.14 2023-06-21 06:40:41 +02:00
James Cole
86a1f170c4 Catch uneven amounts 2023-06-21 06:07:35 +02:00
James Cole
40389fb6d5 fix #7649 2023-06-21 06:06:06 +02:00
James Cole
36021d84cf Fix attachment overview 2023-06-21 06:04:26 +02:00
James Cole
1278f92355 Fix audit log entries and fix #7677 2023-06-21 05:55:57 +02:00
James Cole
573f9adb49 Merge pull request #7676 from timendum/master
Rule ConvertToDeposit: fix missing parameter
2023-06-20 20:03:57 +02:00
Timendum
431c99c27b Rule ConvertToDeposit: fix missing parameter 2023-06-20 15:31:49 +00:00
James Cole
77cc558931 chore: code cleanup 2023-06-20 07:20:26 +02:00
James Cole
42043de34f fix: replace console messages with unified command. 2023-06-20 07:16:56 +02:00
James Cole
f2b2c2109f Merge pull request #7668 from firefly-iii/dependabot/composer/develop/predis/predis-2.2.0 2023-06-19 07:15:54 +02:00
dependabot[bot]
7fe29ad983 Bump predis/predis from 2.1.2 to 2.2.0
Bumps [predis/predis](https://github.com/predis/predis) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/predis/predis/releases)
- [Changelog](https://github.com/predis/predis/blob/v2.x/CHANGELOG.md)
- [Commits](https://github.com/predis/predis/compare/v2.1.2...v2.2.0)

---
updated-dependencies:
- dependency-name: predis/predis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 05:13:33 +00:00
James Cole
07d9bcfb9d Merge pull request #7671 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.19 2023-06-19 07:07:51 +02:00
James Cole
fdd235e4cb Merge pull request #7670 from firefly-iii/dependabot/composer/develop/nunomaduro/larastan-2.6.3 2023-06-19 07:07:42 +02:00
James Cole
2646acadb8 Merge pull request #7669 from firefly-iii/dependabot/composer/develop/fakerphp/faker-1.23.0 2023-06-19 07:07:33 +02:00
James Cole
5ef646b810 Merge pull request #7667 from firefly-iii/dependabot/composer/develop/nunomaduro/collision-7.6.0 2023-06-19 07:07:15 +02:00
dependabot[bot]
e8bdb5ef38 Bump phpstan/phpstan from 1.10.18 to 1.10.19
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.18 to 1.10.19.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.18...1.10.19)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:56:57 +00:00
dependabot[bot]
7a851c2cc6 Bump nunomaduro/larastan from 2.6.2 to 2.6.3
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/RELEASE.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/v2.6.2...v2.6.3)

---
updated-dependencies:
- dependency-name: nunomaduro/larastan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:56:49 +00:00
dependabot[bot]
624784e54e Bump fakerphp/faker from 1.22.0 to 1.23.0
Bumps [fakerphp/faker](https://github.com/FakerPHP/Faker) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/FakerPHP/Faker/releases)
- [Changelog](https://github.com/FakerPHP/Faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/FakerPHP/Faker/compare/v1.22.0...v1.23.0)

---
updated-dependencies:
- dependency-name: fakerphp/faker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:56:38 +00:00
dependabot[bot]
20eb2ebe58 Bump nunomaduro/collision from 7.5.2 to 7.6.0
Bumps [nunomaduro/collision](https://github.com/nunomaduro/collision) from 7.5.2 to 7.6.0.
- [Changelog](https://github.com/nunomaduro/collision/blob/v7.x/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/collision/compare/v7.5.2...v7.6.0)

---
updated-dependencies:
- dependency-name: nunomaduro/collision
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:56:28 +00:00
James Cole
25f8acb417 Chore: use of else in accountform 2023-06-18 06:26:50 +02:00
James Cole
f75e6430b1 Fix: nullpointer in billrepository. 2023-06-18 06:26:38 +02:00
James Cole
e72a483c49 Merge pull request #7656 from firefly-iii/fix-7609
Fix #7609
2023-06-14 18:45:14 +02:00
James Cole
68934858ce Fix #7609 2023-06-14 18:44:54 +02:00
James Cole
c08b5177d9 Merge pull request #7647 from firefly-iii/account-validation
Fix account validation
2023-06-12 20:25:08 +02:00
James Cole
fe8635f1ce Fix account validation 2023-06-12 20:24:45 +02:00
James Cole
e96d28b981 Merge pull request #7645 from firefly-iii/fix-7642
Fix #7642
2023-06-12 06:31:25 +02:00
James Cole
784cc3d52d Fix #7642 2023-06-12 06:31:03 +02:00
James Cole
2ab3fb3a71 Merge pull request #7644 from firefly-iii/fix-7630
Fix #7630
2023-06-12 06:24:46 +02:00
James Cole
ff765d4687 Fix #7630 2023-06-12 06:24:30 +02:00
James Cole
f6e778e1d4 Merge branch 'release/v6.0.13' 2023-06-11 18:19:07 +02:00
James Cole
ed36604050 Merge tag 'v6.0.13' into develop
v6.0.13
2023-06-11 18:19:07 +02:00
James Cole
cbf8c6e80d Release v6.0.13 fixes an issue with the authentication controllers. 2023-06-11 18:18:46 +02:00
James Cole
f11db0de61 Merge tag 'v6.0.12' into develop
v6.0.12
2023-06-11 16:34:31 +02:00
James Cole
34f16dcdd5 Merge branch 'release/v6.0.12' 2023-06-11 16:34:30 +02:00
James Cole
f18aae39b8 chore: Meta files for new release 2023-06-11 16:34:06 +02:00
James Cole
924171e7b9 Merge pull request #7640 from firefly-iii/fix-7613
Fix #7613
2023-06-11 16:15:40 +02:00
James Cole
6b580212bf Fix #7613 2023-06-11 16:15:22 +02:00
James Cole
208ae1cae7 Merge pull request #7639 from firefly-iii/fix-7619
Fix #7619
2023-06-11 16:12:41 +02:00
James Cole
3aa7fe47de Fix #7619 2023-06-11 16:12:13 +02:00
James Cole
5318082467 Merge pull request #7638 from firefly-iii/chore2
Fix CSS again
2023-06-11 15:51:42 +02:00
James Cole
941ec095e5 Fix CSS again 2023-06-11 15:51:17 +02:00
James Cole
d5ebd8e57c Merge pull request #7637 from firefly-iii/chore
Chore: Update version and better colors.
2023-06-11 12:21:11 +02:00
James Cole
ebe087984d Chore: Update version and better colors. 2023-06-11 12:20:57 +02:00
James Cole
fa993e02dd Merge pull request #7634 from firefly-iii/fix-missing-var
Fix: missing variable
2023-06-10 21:42:09 +02:00
James Cole
44df77f45a Fix: missing variable 2023-06-10 21:41:45 +02:00
James Cole
0f8f95de9a Merge pull request #7628 from firefly-iii/fix-7618
Fix 7618
2023-06-10 16:21:40 +02:00
James Cole
f32283d2f1 Fix #7618 2023-06-10 16:21:01 +02:00
James Cole
14f8695599 Merge pull request #7627 from firefly-iii/fix-forms
Fix forms
2023-06-10 16:09:00 +02:00
James Cole
f8b48f7455 Fix forms 2023-06-10 16:08:32 +02:00
James Cole
70e2aab073 Merge pull request #7623 from firefly-iii/fix-7620
Fix #7620
2023-06-10 13:15:33 +02:00
James Cole
12db745f17 Fix #7620 2023-06-10 13:15:06 +02:00
James Cole
8a48cc690f Merge pull request #7612 from firefly-iii/logo-tune-2
Another small tune
2023-06-06 12:42:44 +02:00
James Cole
eb313c65a5 Another small tune 2023-06-06 12:42:20 +02:00
James Cole
07d6cbc194 Merge pull request #7611 from firefly-iii/logo-tune
chore: tune the logo
2023-06-06 12:38:50 +02:00
James Cole
8975a462c4 Merge pull request #7610 from firefly-iii/fix-form
fix: expand form elements with ID
2023-06-06 06:19:42 +02:00
James Cole
2e4f07d058 fix: expand form elements with ID 2023-06-06 06:19:24 +02:00
James Cole
74a2935fea Merge pull request #7600 from firefly-iii/upgrade-html
Upgrade html
2023-06-04 15:16:47 +02:00
James Cole
3d02468828 fix: replace deprecated package 2023-06-04 15:16:17 +02:00
James Cole
0438fb5a2e fix: remove and replace old form functions 2023-06-04 10:09:45 +02:00
James Cole
a4f9a6fd42 fix: replace deprecated form.model with html 2023-06-04 10:09:24 +02:00
James Cole
a0be4c9daa chore: tune the logo 2023-06-04 07:53:56 +02:00
James Cole
2dc003bd85 Merge pull request #7597 from firefly-iii/logo-expansion
feat: Expand logo in startup scripts
2023-06-04 06:58:52 +02:00
James Cole
78aa8bd838 feat: Expand logo in startup scripts 2023-06-04 06:58:35 +02:00
James Cole
f55fde2b52 Merge pull request #7596 from firefly-iii/fix-yaml
fix qodana yaml
2023-06-04 06:33:21 +02:00
James Cole
232572549e fix qodana yaml 2023-06-04 06:33:05 +02:00
James Cole
d07705c329 Merge pull request #7595 from firefly-iii/qodana-fix
chore: fix various qodana issues
2023-06-04 06:30:45 +02:00
James Cole
688ca8e374 chore: fix various qodana issues 2023-06-04 06:30:22 +02:00
James Cole
160c364d2a Merge pull request #7594 from firefly-iii/missing-bracket
fix: extra bracket breaks code.
2023-06-04 06:14:38 +02:00
James Cole
2b3e6bfbb9 Merge pull request #7593 from josephbadow/fix-urls-envexample-#7580
Fix URLs in .env.example #7580
2023-06-04 06:13:49 +02:00
James Cole
5a55d1db24 fix: extra bracket breaks code. 2023-06-04 06:13:24 +02:00
josephbadow
bd252dbc16 amend links in .env.example to point to correct documentation pages 2023-06-03 22:16:59 +02:00
James Cole
30124855e3 Merge pull request #7592 from firefly-iii/fix-7589
First attempt to fix #7589
2023-06-03 21:20:15 +02:00
James Cole
463ebd296f First attempt to fix #7589 2023-06-03 21:17:49 +02:00
James Cole
2e7a17560d Merge branch 'main' into develop 2023-06-03 17:19:14 +02:00
James Cole
374d5a074d Merge pull request #7591 from firefly-iii/fix-command-output
chore: fix command output
2023-06-03 17:18:21 +02:00
James Cole
88b294d873 chore: fix command output 2023-06-03 17:18:04 +02:00
James Cole
0aa6d5b322 Merge pull request #7590 from firefly-iii/fix-7588
Fix https://github.com/firefly-iii/firefly-iii/issues/7588
2023-06-03 17:16:51 +02:00
James Cole
1357074dcd Fix https://github.com/firefly-iii/firefly-iii/issues/7588 2023-06-03 17:16:28 +02:00
James Cole
4a03847c14 Merge pull request #7584 from firefly-iii/JC5-patch-1
Create sonarcloud.yml
2023-06-03 05:53:03 +02:00
James Cole
346289fdb2 Create sonarcloud.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-06-03 05:52:50 +02:00
James Cole
673c7d98f6 Merge pull request #7583 from firefly-iii/JC5-patch-1
Delete sonarcloud.yaml
2023-06-03 05:52:26 +02:00
James Cole
9473fb849a Delete sonarcloud.yaml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-06-03 05:52:17 +02:00
James Cole
f60e244739 Merge pull request #7579 from firefly-iii/JC5-patch-1
Update contributing.md
2023-06-02 12:30:58 +02:00
James Cole
a571106f0f Update contributing.md
Signed-off-by: James Cole <james@firefly-iii.org>
2023-06-02 12:30:41 +02:00
James Cole
244d9be46e Merge pull request #7578 from firefly-iii/improv-commands
cleanup: Commands are a lot less verbal and report better on success …
2023-06-02 07:36:53 +02:00
James Cole
dcf71c6fdf cleanup: Commands are a lot less verbal and report better on success / failue 2023-06-02 07:36:17 +02:00
James Cole
1e1497ff4e Merge pull request #7577 from firefly-iii/fix-billrepos
clean: remove deprecated methods and refactor as necessary.
2023-06-02 06:38:49 +02:00
James Cole
b72aa92e55 clean: remove deprecated methods and refactor as necessary. 2023-06-02 06:38:07 +02:00
James Cole
527f18c1e3 Merge branch 'main' into develop 2023-06-01 19:50:19 +02:00
James Cole
788003dcdc Merge pull request #7574 from firefly-iii/fix-7572
Fix #7572
2023-06-01 19:50:05 +02:00
James Cole
c764ddd3be Fix #7572 2023-06-01 19:49:28 +02:00
James Cole
057ac0691c Update closed-issues.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-06-01 06:43:28 +02:00
James Cole
4334e9bed7 chore: small fixes and prep for new language 2023-05-30 20:15:07 +02:00
James Cole
a9bb87b0c6 Merge pull request #7566 from firefly-iii/chore/fix-small-issues
chore: fix various small sonacloud issues to see if the actions run c…
2023-05-29 14:18:50 +02:00
James Cole
43f668dc65 config: no more sonarcloud / qodana for each PR. 2023-05-29 14:18:43 +02:00
James Cole
6ed5892cf9 chore: fix various small sonacloud issues to see if the actions run correctly. 2023-05-29 14:17:10 +02:00
James Cole
023a3fdade Merge pull request #7565 from firefly-iii/chore/cleanup
chore: code cleanup.
2023-05-29 14:01:32 +02:00
James Cole
1b52147a05 chore: code cleanup. 2023-05-29 13:56:55 +02:00
James Cole
7f7644c92f Merge pull request #7564 from firefly-iii/fix-ci
Fix ci
2023-05-29 12:06:09 +02:00
James Cole
70b756baaf Fix linter 2023-05-29 12:05:45 +02:00
James Cole
0f008b9b1e Merge branch 'main' into develop 2023-05-29 11:58:39 +02:00
James Cole
4d956858de Merge pull request #7563 from firefly-iii/dependabot/npm_and_yarn/develop/postcss-8.4.24 2023-05-29 06:01:06 +02:00
James Cole
959370a204 Merge pull request #7562 from firefly-iii/dependabot/composer/develop/symfony/http-client-6.2.11 2023-05-29 06:00:58 +02:00
dependabot[bot]
336829cd24 Bump postcss from 8.4.23 to 8.4.24
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.24.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.23...8.4.24)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 03:57:03 +00:00
dependabot[bot]
5975ab5170 Bump symfony/http-client from 6.2.10 to 6.2.11
Bumps [symfony/http-client](https://github.com/symfony/http-client) from 6.2.10 to 6.2.11.
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/6.3/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-client/compare/v6.2.10...v6.2.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 03:56:29 +00:00
James Cole
eba0e942e8 Update sonarcloud.yaml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 16:08:47 +02:00
James Cole
f45c20db1e Update cleanup.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 16:08:34 +02:00
James Cole
79afe09d8d Update cleanup.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 16:07:47 +02:00
James Cole
334d010a24 Create sonarcloud.yaml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 16:07:08 +02:00
James Cole
91947daa5b Create sonar-project.properties
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 16:05:25 +02:00
James Cole
aad2ca4488 Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 15:58:48 +02:00
James Cole
7c68a96f7b Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 15:56:35 +02:00
James Cole
2e1e8b5d39 Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 15:54:48 +02:00
James Cole
178df1ed4a Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 06:24:06 +02:00
James Cole
28749e2513 Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 06:21:03 +02:00
James Cole
6cbe57ef40 Update qodana.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-05-28 06:17:34 +02:00
James Cole
13d3b86309 Fix #7557 2023-05-28 06:07:26 +02:00
James Cole
cf8f43cdf2 Merge tag 'v6.0.11' into develop
v6.0.11
2023-05-27 07:12:28 +02:00
James Cole
cc83268b2c Merge branch 'release/v6.0.11' 2023-05-27 07:12:26 +02:00
James Cole
8f23b47a78 Meta files for new release. 2023-05-27 07:12:04 +02:00
James Cole
529611170c Fix #7541 2023-05-27 06:42:10 +02:00
James Cole
c1114e889e Fix #7546 2023-05-27 06:40:23 +02:00
James Cole
d20e03a7b6 Merge pull request #7556 from firefly-iii/fix-7547
Fix 7547
2023-05-27 06:37:00 +02:00
James Cole
6303233bdf Fix #7547 2023-05-27 06:36:24 +02:00
James Cole
baa8c00144 Merge pull request #7555 from firefly-iii/fix-7549
Fix #7549
2023-05-27 05:56:07 +02:00
James Cole
e6daaa5b6d Fix #7549 2023-05-27 05:55:41 +02:00
James Cole
f711fcfd52 Merge pull request #7535 from ChrisWin22/withdraw-from-piggy-banks
Withdraw from piggy banks
2023-05-24 08:22:41 +02:00
Christian Desktop
74992e95f2 Withdrawal directly from Piggy Bank - Fixes #6631 2023-05-24 00:13:46 -06:00
James Cole
20c8c1043f Update languages and rephrase sentence. 2023-05-24 06:40:31 +02:00
James Cole
f00898afba Merge pull request #7533 from firefly-iii/dependabot/composer/develop/laravel/ui-4.2.2
Bump laravel/ui from 4.2.1 to 4.2.2
2023-05-22 06:25:51 +02:00
dependabot[bot]
95b431535e Bump laravel/ui from 4.2.1 to 4.2.2
Bumps [laravel/ui](https://github.com/laravel/ui) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/laravel/ui/releases)
- [Changelog](https://github.com/laravel/ui/blob/4.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/ui/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: laravel/ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 04:18:35 +00:00
James Cole
cafd8a9674 Merge pull request #7534 from firefly-iii/dependabot/npm_and_yarn/develop/vue/compiler-sfc-3.3.4
Bump @vue/compiler-sfc from 3.3.2 to 3.3.4
2023-05-22 06:18:14 +02:00
James Cole
e1e7f914f9 Merge pull request #7532 from firefly-iii/dependabot/composer/develop/guzzlehttp/guzzle-7.7.0
Bump guzzlehttp/guzzle from 7.6.0 to 7.7.0
2023-05-22 06:18:02 +02:00
James Cole
19c2f7d2bf Merge pull request #7531 from firefly-iii/dependabot/composer/develop/fakerphp/faker-1.22.0
Bump fakerphp/faker from 1.21.0 to 1.22.0
2023-05-22 06:17:55 +02:00
James Cole
7daacd9b66 Merge pull request #7530 from firefly-iii/dependabot/composer/develop/laravel/framework-10.11.0
Bump laravel/framework from 10.10.1 to 10.11.0
2023-05-22 06:17:47 +02:00
dependabot[bot]
af715de566 Bump @vue/compiler-sfc from 3.3.2 to 3.3.4
Bumps [@vue/compiler-sfc](https://github.com/vuejs/core/tree/HEAD/packages/compiler-sfc) from 3.3.2 to 3.3.4.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/commits/v3.3.4/packages/compiler-sfc)

---
updated-dependencies:
- dependency-name: "@vue/compiler-sfc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 03:57:37 +00:00
dependabot[bot]
93e3c89f20 Bump guzzlehttp/guzzle from 7.6.0 to 7.7.0
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.6.0 to 7.7.0.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.7/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.6.0...7.7.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 03:56:53 +00:00
dependabot[bot]
b0456c5252 Bump fakerphp/faker from 1.21.0 to 1.22.0
Bumps [fakerphp/faker](https://github.com/FakerPHP/Faker) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/FakerPHP/Faker/releases)
- [Changelog](https://github.com/FakerPHP/Faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/FakerPHP/Faker/compare/v1.21.0...v1.22.0)

---
updated-dependencies:
- dependency-name: fakerphp/faker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 03:56:46 +00:00
dependabot[bot]
f7fa03ddd8 Bump laravel/framework from 10.10.1 to 10.11.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.10.1 to 10.11.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.10.1...v10.11.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 03:56:41 +00:00
James Cole
4c78e23a9c Merge pull request #7523 from firefly-iii/fix-7522
Fix 7522
2023-05-19 05:44:33 +02:00
James Cole
79c2065471 fix: Add relevant periods to addPeriod 2023-05-19 05:43:50 +02:00
James Cole
c19b89ac93 Fix: budget amounts 2023-05-19 05:39:21 +02:00
James Cole
62a1837d61 fix: debug would always report midnight. 2023-05-19 05:38:50 +02:00
James Cole
56b34aa624 Merge pull request #7517 from firefly-iii/fix-7516
Fix #7516
2023-05-18 05:38:42 +02:00
James Cole
e8392155f9 Fix #7516 2023-05-18 05:38:17 +02:00
James Cole
6d532470e6 Merge pull request #7515 from firefly-iii/fix-7514
Fix #7514
2023-05-17 15:20:09 +02:00
James Cole
15f683ef7e Fix #7514 2023-05-17 15:19:27 +02:00
James Cole
18ba2e563e Merge pull request #7513 from firefly-iii/fix-7505
Fix #7505
2023-05-17 07:02:39 +02:00
James Cole
63984f1c37 Fix #7505 2023-05-17 07:02:08 +02:00
James Cole
3c082dcf0e Restore cron options. 2023-05-16 21:04:06 +02:00
James Cole
090eb55226 Merge pull request #7502 from firefly-iii/dependabot/composer/develop/guzzlehttp/guzzle-7.6.0
Bump guzzlehttp/guzzle from 7.5.1 to 7.6.0
2023-05-15 06:35:17 +02:00
James Cole
4706cd44de Fix rounding issues. 2023-05-15 06:33:30 +02:00
James Cole
cf7c01e5d0 Merge pull request #7503 from firefly-iii/feat/adjusted-budget
feat: a budget type that will rollover but also incorporate overspend…
2023-05-15 06:18:23 +02:00
James Cole
0b5e0a268a feat: a budget type that will rollover but also incorporate overspending from the previous period (if any) 2023-05-15 06:18:02 +02:00
dependabot[bot]
9eea4497e5 Bump guzzlehttp/guzzle from 7.5.1 to 7.6.0
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.5.1 to 7.6.0.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.6/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.5.1...7.6.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 03:56:23 +00:00
James Cole
63fdc2487f Merge pull request #7499 from firefly-iii/remove-logging
Remove logging
2023-05-13 06:43:30 +02:00
James Cole
cf59da7e0c Remove logging 2023-05-13 06:43:07 +02:00
James Cole
e0621affb6 Merge tag 'v6.0.10' into develop
v6.0.10
2023-05-13 06:34:38 +02:00
James Cole
6d0906c37b Merge branch 'release/v6.0.10' 2023-05-13 06:34:37 +02:00
James Cole
a3ede0c6f6 Meta files for new release. 2023-05-13 06:34:12 +02:00
James Cole
72eab3c0eb Merge pull request #7498 from firefly-iii/fix-7478
Fix #7478
2023-05-13 06:17:44 +02:00
James Cole
c530961546 Fix #7478 2023-05-13 06:17:22 +02:00
James Cole
dd7aba0b51 Merge pull request #7497 from firefly-iii/fix-7448-2
Fix #7448
2023-05-13 06:09:24 +02:00
James Cole
7c54e17a30 Fix #7448 2023-05-13 06:09:04 +02:00
James Cole
342d72b0a6 Merge pull request #7495 from firefly-iii/expand-fix
Fix decimals command expanded.
2023-05-13 06:07:15 +02:00
James Cole
22ee504e52 Fix decimals command expanded. 2023-05-13 05:56:49 +02:00
James Cole
4880ee850e Merge pull request #7494 from firefly-iii/fix-7444
Fix 7444
2023-05-13 05:32:05 +02:00
James Cole
b45ce27817 Fix #7444 2023-05-13 05:31:41 +02:00
James Cole
dfad93d9ec Merge pull request #7473 from firefly-iii/dependabot/npm_and_yarn/develop/uiv-1.4.3
Bump uiv from 1.4.2 to 1.4.3
2023-05-08 06:16:02 +02:00
James Cole
52712c8cb2 Merge pull request #7472 from firefly-iii/dependabot/composer/develop/ergebnis/phpstan-rules-2.0.0
Bump ergebnis/phpstan-rules from 1.0.0 to 2.0.0
2023-05-08 06:15:52 +02:00
James Cole
740874e654 Merge pull request #7471 from firefly-iii/dependabot/composer/develop/spatie/laravel-ignition-2.1.1
Bump spatie/laravel-ignition from 2.1.0 to 2.1.1
2023-05-08 06:15:44 +02:00
James Cole
0f1f37a5df Merge pull request #7470 from firefly-iii/dependabot/composer/develop/laravel/sanctum-3.2.5
Bump laravel/sanctum from 3.2.4 to 3.2.5
2023-05-08 06:07:43 +02:00
dependabot[bot]
d609cbfb16 Bump uiv from 1.4.2 to 1.4.3
Bumps [uiv](https://github.com/uiv-lib/uiv) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/uiv-lib/uiv/releases)
- [Commits](https://github.com/uiv-lib/uiv/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: uiv
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 03:56:47 +00:00
dependabot[bot]
2375857c92 Bump ergebnis/phpstan-rules from 1.0.0 to 2.0.0
Bumps [ergebnis/phpstan-rules](https://github.com/ergebnis/phpstan-rules) from 1.0.0 to 2.0.0.
- [Release notes](https://github.com/ergebnis/phpstan-rules/releases)
- [Changelog](https://github.com/ergebnis/phpstan-rules/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ergebnis/phpstan-rules/compare/1.0.0...2.0.0)

---
updated-dependencies:
- dependency-name: ergebnis/phpstan-rules
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 03:56:37 +00:00
dependabot[bot]
10275eb832 Bump spatie/laravel-ignition from 2.1.0 to 2.1.1
Bumps [spatie/laravel-ignition](https://github.com/spatie/laravel-ignition) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/spatie/laravel-ignition/releases)
- [Changelog](https://github.com/spatie/laravel-ignition/blob/main/CHANGELOG.md)
- [Commits](https://github.com/spatie/laravel-ignition/compare/2.1.0...2.1.1)

---
updated-dependencies:
- dependency-name: spatie/laravel-ignition
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 03:56:33 +00:00
dependabot[bot]
108867b2ef Bump laravel/sanctum from 3.2.4 to 3.2.5
Bumps [laravel/sanctum](https://github.com/laravel/sanctum) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/laravel/sanctum/releases)
- [Changelog](https://github.com/laravel/sanctum/blob/3.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/sanctum/compare/v3.2.4...v3.2.5)

---
updated-dependencies:
- dependency-name: laravel/sanctum
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 03:56:26 +00:00
James Cole
e5a77a86f9 Fix a few commands. 2023-05-07 20:17:29 +02:00
James Cole
309d3e8e95 Fix missing account validation step. 2023-05-06 15:59:31 +02:00
James Cole
1ef9b83180 Merge pull request #7466 from firefly-iii/fix-7456
Fix #7456
2023-05-06 15:29:56 +02:00
James Cole
85757e1a20 Fix #7456 2023-05-06 15:29:29 +02:00
James Cole
e2a18e0e7c Merge pull request #7461 from eandersons/Focus-on-MFA-input-field
Focus on MFA input field on page load
2023-05-04 21:05:53 +02:00
Edgars
056af8fd8a Focus on MFA input field on page load 2023-05-04 15:13:47 +03:00
James Cole
c72a63f218 Merge pull request #7458 from firefly-iii/fix-7457
Fix #7457
2023-05-03 05:59:30 +02:00
James Cole
fb823ed422 Fix #7457 2023-05-03 05:59:10 +02:00
James Cole
3fae6c0cac Merge pull request #7451 from firefly-iii/dependabot/composer/develop/laravel/passport-11.8.7
Bump laravel/passport from 11.8.6 to 11.8.7
2023-05-02 08:21:36 +02:00
James Cole
55b1e22d37 Merge pull request #7452 from firefly-iii/dependabot/npm_and_yarn/develop/date-fns-2.30.0
Bump date-fns from 2.29.3 to 2.30.0
2023-05-02 08:21:27 +02:00
James Cole
e6b95c7894 Merge pull request #7450 from firefly-iii/dependabot/composer/develop/symfony/mailgun-mailer-6.2.10
Bump symfony/mailgun-mailer from 6.2.7 to 6.2.10
2023-05-01 10:42:30 +02:00
dependabot[bot]
ea2f9e4919 Bump symfony/mailgun-mailer from 6.2.7 to 6.2.10
Bumps [symfony/mailgun-mailer](https://github.com/symfony/mailgun-mailer) from 6.2.7 to 6.2.10.
- [Release notes](https://github.com/symfony/mailgun-mailer/releases)
- [Changelog](https://github.com/symfony/mailgun-mailer/blob/6.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/mailgun-mailer/compare/v6.2.7...v6.2.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 07:46:51 +00:00
James Cole
08bd405e29 Merge pull request #7449 from firefly-iii/dependabot/composer/develop/symfony/http-client-6.2.10 2023-05-01 09:45:59 +02:00
dependabot[bot]
8294b2d526 Bump date-fns from 2.29.3 to 2.30.0
Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.29.3 to 2.30.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/v2.30.0/CHANGELOG.md)
- [Commits](https://github.com/date-fns/date-fns/compare/v2.29.3...v2.30.0)

---
updated-dependencies:
- dependency-name: date-fns
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 03:57:00 +00:00
dependabot[bot]
b521fb8fae Bump laravel/passport from 11.8.6 to 11.8.7
Bumps [laravel/passport](https://github.com/laravel/passport) from 11.8.6 to 11.8.7.
- [Release notes](https://github.com/laravel/passport/releases)
- [Changelog](https://github.com/laravel/passport/blob/11.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/passport/compare/v11.8.6...v11.8.7)

---
updated-dependencies:
- dependency-name: laravel/passport
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 03:56:45 +00:00
dependabot[bot]
3e9789d5e6 Bump symfony/http-client from 6.2.9 to 6.2.10
Bumps [symfony/http-client](https://github.com/symfony/http-client) from 6.2.9 to 6.2.10.
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/6.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-client/compare/v6.2.9...v6.2.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 03:56:27 +00:00
James Cole
13b029d7f0 Merge pull request #7447 from firefly-iii/fix-7446
Fix #7446
2023-04-30 19:13:34 +02:00
James Cole
59427ba5c2 Fix #7446 2023-04-30 19:12:49 +02:00
James Cole
46bba9d799 Various optimizations in budget limit handling. 2023-04-30 06:45:25 +02:00
James Cole
0ef1d1834f Fix template 2023-04-29 19:19:53 +02:00
James Cole
e39b2f5355 Fix template 2023-04-29 17:39:01 +02:00
James Cole
03dae53714 Fix template 2023-04-29 14:40:12 +02:00
James Cole
6be6187532 Add base build info. 2023-04-29 11:15:30 +02:00
James Cole
4c26f613ee Merge pull request #7443 from firefly-iii/expand-health-check
Change health endpoint to include a DB check.
2023-04-29 07:44:56 +02:00
James Cole
765de2eeba Change health endpoint to include a DB check. 2023-04-29 07:44:37 +02:00
James Cole
49b1fef7ff Merge pull request #7442 from firefly-iii/fix-iban-check
Don't trigger on empty ibans.
2023-04-29 07:09:05 +02:00
James Cole
36157afc6a Don't trigger on empty ibans. 2023-04-29 07:08:11 +02:00
James Cole
c5c3638dbc Merge tag '6.0.9' into develop
v6.0.9
2023-04-28 09:27:43 +02:00
James Cole
926665a8f5 Merge branch 'release/6.0.9' 2023-04-28 09:27:42 +02:00
James Cole
e35743ff42 Update meta files for new release. 2023-04-28 09:27:14 +02:00
James Cole
321743dbf6 Merge pull request #7439 from firefly-iii/fix-7394
Fix 7394
2023-04-28 09:06:48 +02:00
James Cole
c2e1e25489 Fix #7394 2023-04-28 09:06:05 +02:00
James Cole
222387adba Merge pull request #7438 from firefly-iii/division-by-zero
Fix division by zero
2023-04-28 08:39:54 +02:00
James Cole
335414f25a Fix division by zero 2023-04-28 08:39:30 +02:00
James Cole
ea903c105d Merge pull request #7437 from mindlessroman/patch-1
Update the links to the installation documentation
2023-04-27 17:16:39 +02:00
Hannah K
aab29852b4 Merge branch 'develop' into patch-1
Signed-off-by: Hannah K <7254163+mindlessroman@users.noreply.github.com>
2023-04-27 11:12:43 -04:00
Hannah K
aa17ea0b68 Update the links to the installation documentation
Signed-off-by: Hannah K <7254163+mindlessroman@users.noreply.github.com>
2023-04-27 11:02:38 -04:00
James Cole
deeb5bf118 Merge pull request #7435 from firefly-iii/better-ab-mgt
Remove dangerous eternal loop
2023-04-26 12:13:22 +02:00
James Cole
47d5e8d169 Remove dangerous eternal loop 2023-04-26 12:12:23 +02:00
James Cole
033d61abbb Merge pull request #7434 from firefly-iii/better-ab-mgt
Better management and calculation of available budgets.
2023-04-26 11:32:18 +02:00
James Cole
28efc15820 Better management and calculation of available budgets. 2023-04-26 11:31:46 +02:00
James Cole
1c7988fad2 Fix #7389 2023-04-26 06:59:42 +02:00
James Cole
c8077762ba Merge pull request #7433 from firefly-iii/remove-debug
Remove debug logging.
2023-04-26 06:41:53 +02:00
James Cole
ea53b34cbb Remove debug logging. 2023-04-26 06:41:06 +02:00
James Cole
270ac87e65 Merge pull request #7432 from firefly-iii/max-values
Add sensible maximum values.
2023-04-26 06:17:50 +02:00
James Cole
0a60f63bf8 Add sensible maximum values. 2023-04-26 06:17:04 +02:00
James Cole
38ed70243e Merge pull request #7431 from firefly-iii/fix-validation
Add validation check.
2023-04-26 06:00:56 +02:00
James Cole
0f2a9a9b37 Add validation check. 2023-04-26 06:00:04 +02:00
James Cole
ec525849fc Merge pull request #7430 from firefly-iii/fix-validation
Fix length validation
2023-04-26 05:56:20 +02:00
James Cole
dee1e1a79d Fix length validation 2023-04-26 05:55:31 +02:00
James Cole
98b5ed9e5b Merge pull request #7429 from firefly-iii/error-rate-bills
Add rule for notes and better escaping in errors.
2023-04-26 05:30:06 +02:00
James Cole
d8eb084240 Add rule for notes and better escaping in errors. 2023-04-26 05:29:28 +02:00
James Cole
c2f5fbe7d3 Merge pull request #7428 from noxonad/patch-1
Fixed misleading documentation links in readme.md
2023-04-25 16:16:29 +02:00
noxonad
60f6542a1b Fixed misleading documentation links in readme.md
Signed-off-by: noxonad <130460440+noxonad@users.noreply.github.com>
2023-04-25 13:11:34 +03:00
James Cole
93c2edf76c Merge pull request #7424 from firefly-iii/dependabot/composer/develop/guzzlehttp/guzzle-7.5.1
Bump guzzlehttp/guzzle from 7.5.0 to 7.5.1
2023-04-24 06:19:07 +02:00
James Cole
f74f4c5719 Merge pull request #7425 from firefly-iii/dependabot/npm_and_yarn/develop/axios-1.3.6
Bump axios from 1.3.5 to 1.3.6
2023-04-24 06:18:57 +02:00
James Cole
8c67c347e1 Merge pull request #7423 from firefly-iii/dependabot/composer/develop/nunomaduro/larastan-2.6.0
Bump nunomaduro/larastan from 2.5.1 to 2.6.0
2023-04-24 06:18:46 +02:00
dependabot[bot]
fcbc341f03 Bump nunomaduro/larastan from 2.5.1 to 2.6.0
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/RELEASE.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/2.5.1...v2.6.0)

---
updated-dependencies:
- dependency-name: nunomaduro/larastan
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 04:18:39 +00:00
dependabot[bot]
2dbce10483 Bump guzzlehttp/guzzle from 7.5.0 to 7.5.1
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.5.0 to 7.5.1.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.5.0...7.5.1)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 04:18:36 +00:00
James Cole
8504b3e3a9 Merge pull request #7422 from firefly-iii/dependabot/npm_and_yarn/develop/postcss-8.4.23
Bump postcss from 8.4.22 to 8.4.23
2023-04-24 06:18:36 +02:00
James Cole
d4ab5dcefd Merge pull request #7421 from firefly-iii/dependabot/composer/develop/diglactic/laravel-breadcrumbs-8.1.1
Bump diglactic/laravel-breadcrumbs from 8.1.0 to 8.1.1
2023-04-24 06:17:55 +02:00
James Cole
5d11e285bc Merge pull request #7420 from firefly-iii/dependabot/composer/develop/laravel/framework-10.8.0
Bump laravel/framework from 10.7.1 to 10.8.0
2023-04-24 06:10:25 +02:00
James Cole
259e1350d5 Merge pull request #7419 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.14
Bump phpstan/phpstan from 1.10.13 to 1.10.14
2023-04-24 06:08:16 +02:00
dependabot[bot]
dd54ec6122 Bump axios from 1.3.5 to 1.3.6
Bumps [axios](https://github.com/axios/axios) from 1.3.5 to 1.3.6.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.3.5...v1.3.6)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:57:31 +00:00
dependabot[bot]
c2b3791336 Bump postcss from 8.4.22 to 8.4.23
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.22 to 8.4.23.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.22...8.4.23)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:57:08 +00:00
dependabot[bot]
fc1f15cc14 Bump diglactic/laravel-breadcrumbs from 8.1.0 to 8.1.1
Bumps [diglactic/laravel-breadcrumbs](https://github.com/diglactic/laravel-breadcrumbs) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/diglactic/laravel-breadcrumbs/releases)
- [Commits](https://github.com/diglactic/laravel-breadcrumbs/compare/v8.1.0...v8.1.1)

---
updated-dependencies:
- dependency-name: diglactic/laravel-breadcrumbs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:57:00 +00:00
dependabot[bot]
5d74979f50 Bump laravel/framework from 10.7.1 to 10.8.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.7.1 to 10.8.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.7.1...v10.8.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:56:49 +00:00
dependabot[bot]
5dea7e5b41 Bump phpstan/phpstan from 1.10.13 to 1.10.14
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.13 to 1.10.14.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.13...1.10.14)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:56:31 +00:00
James Cole
a53a8a8529 Merge pull request #7417 from firefly-iii/fix-7410
Fix #7410
2023-04-23 18:24:20 +02:00
James Cole
aac7a2691d Fix #7410 2023-04-23 18:23:02 +02:00
James Cole
10e7be1729 Merge branch 'main' into develop 2023-04-22 06:43:09 +02:00
James Cole
9b1319f970 Fix bad math in page counter. 2023-04-22 06:42:26 +02:00
James Cole
a38f909919 Add some debug. 2023-04-22 06:17:46 +02:00
James Cole
d8c0192f54 Merge pull request #7413 from firefly-iii/dependabot/composer/nyholm/psr7-1.7.0
Bump nyholm/psr7 from 1.6.0 to 1.7.0
2023-04-22 05:55:33 +02:00
dependabot[bot]
1e8d294b8d Bump nyholm/psr7 from 1.6.0 to 1.7.0
Bumps [nyholm/psr7](https://github.com/Nyholm/psr7) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/Nyholm/psr7/releases)
- [Changelog](https://github.com/Nyholm/psr7/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Nyholm/psr7/compare/1.6.0...1.7.0)

---
updated-dependencies:
- dependency-name: nyholm/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-21 20:52:03 +00:00
James Cole
d3be64114b Merge pull request #7403 from firefly-iii/dependabot/composer/guzzlehttp/psr7-2.5.0 2023-04-20 07:26:39 +02:00
dependabot[bot]
1bddd4da8e Bump guzzlehttp/psr7 from 2.4.4 to 2.5.0
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.4 to 2.5.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.4.4...2.5.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 21:07:24 +00:00
James Cole
6b5ff2680b Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-19 10:12:51 +02:00
James Cole
efe17f638a Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-19 06:43:31 +02:00
James Cole
3c1f4b7377 Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-19 06:43:19 +02:00
James Cole
acfc214eb1 Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-19 06:42:00 +02:00
James Cole
fe1c605c11 Update lock.yml
Wonder if this works.

Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-19 06:38:09 +02:00
James Cole
891cd94031 Merge branch 'main' into develop 2023-04-17 06:17:42 +02:00
James Cole
c620d57f42 Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-17 06:16:07 +02:00
James Cole
b076c92eb0 Update lock.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-17 06:15:07 +02:00
James Cole
9e35216e98 Merge branch 'main' into develop 2023-04-17 06:09:33 +02:00
James Cole
3fa4734ba7 Merge pull request #7388 from firefly-iii/dependabot/npm_and_yarn/develop/postcss-8.4.22
Bump postcss from 8.4.21 to 8.4.22
2023-04-17 05:57:52 +02:00
dependabot[bot]
0144d09325 Bump postcss from 8.4.21 to 8.4.22
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.22.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.21...8.4.22)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 03:57:03 +00:00
James Cole
f28274aded Update stale.yml
Add epic

Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-17 05:52:00 +02:00
James Cole
d5f5df82b6 Fix small commands 2023-04-16 08:01:40 +02:00
James Cole
49c27aff2d Merge pull request #7385 from firefly-iii/duplicate-commands
Remove duplicate commands.
2023-04-16 07:56:18 +02:00
James Cole
7b1b0cfef9 Remove duplicate commands. 2023-04-16 07:49:53 +02:00
James Cole
f728bdeb5a Merge pull request #7384 from firefly-iii/fix-commands
Fix method name
2023-04-16 07:39:47 +02:00
James Cole
4712a826d1 Fix method name 2023-04-16 07:38:54 +02:00
James Cole
d7335d71ea Merge pull request #7383 from firefly-iii/fix-commands
Fix start and upgrade commands
2023-04-16 07:33:37 +02:00
James Cole
e6a84ab387 Fix start and upgrade commands 2023-04-16 07:33:12 +02:00
James Cole
fd5269490d Merge pull request #7382 from firefly-iii/fix-7377
Another fix for #7377
2023-04-16 06:59:41 +02:00
James Cole
05e307136c Another fix for #7377 2023-04-16 06:59:19 +02:00
James Cole
2c41215e84 Merge pull request #7380 from firefly-iii/fix-7377
Fix #7377
2023-04-16 06:56:54 +02:00
James Cole
d9dc394e7f Fix #7377 2023-04-16 06:56:11 +02:00
James Cole
a63daf6166 Merge tag 'v6.0.8' into develop
v6.0.8
2023-04-15 10:46:24 +02:00
James Cole
f878af0d3b Merge branch 'release/v6.0.8' 2023-04-15 10:46:23 +02:00
James Cole
def0578421 Merge pull request #7371 from firefly-iii/release-608
Update meta-files for new release.
2023-04-15 10:45:36 +02:00
James Cole
a2e07b1518 Update meta-files for new release. 2023-04-15 10:44:58 +02:00
James Cole
dc26ce308d Add decrypt message. 2023-04-15 10:33:33 +02:00
James Cole
0189b91d3b Add deleted check to attachment filter 2023-04-15 10:19:54 +02:00
James Cole
fb6706648e Merge pull request #7370 from firefly-iii/fix-installer
Fix installer
2023-04-15 10:19:34 +02:00
James Cole
3c20fd7533 Fix installer 2023-04-15 10:14:14 +02:00
James Cole
82f89ef614 Merge pull request #7369 from firefly-iii/fix-date-fields
Fix date fields
2023-04-15 07:21:26 +02:00
James Cole
4d10ae91b7 Fix date fields 2023-04-15 07:21:06 +02:00
James Cole
aebb677c21 Add some debug info to transaction counter. 2023-04-15 07:17:48 +02:00
James Cole
abf9c65b21 Merge pull request #7358 from firefly-iii/fix-7355
Fix #7355
2023-04-12 19:58:19 +02:00
James Cole
524dcc7d97 Fix #7355 2023-04-12 06:18:05 +02:00
James Cole
0a4f6fd6b8 Merge pull request #7354 from firefly-iii/redirect
Redirect when unauthenticated.
2023-04-10 14:21:26 +02:00
James Cole
9c4beab0a7 Redirect when unauthenticated. 2023-04-10 14:21:10 +02:00
James Cole
b91e019416 Merge pull request #7353 from firefly-iii/migration-checks
Catch all possible migration errors
2023-04-10 08:29:49 +02:00
James Cole
ad97e33ec0 Catch all possible migration errors 2023-04-10 08:29:27 +02:00
James Cole
b1479b5dae Merge pull request #7352 from firefly-iii/force-commit
Add commit call to force the commands to go through.
2023-04-10 07:20:02 +02:00
James Cole
f1445b0132 Add commit call to force the commands to go through. 2023-04-10 07:19:10 +02:00
James Cole
456dbfd29d Merge pull request #7351 from firefly-iii/add-command
Add decimal command.
2023-04-09 20:29:57 +02:00
James Cole
0eea776b8b Add decimal command. 2023-04-09 20:29:35 +02:00
James Cole
853a97307b Merge pull request #7350 from firefly-iii/fix-7349
Fix 7349
2023-04-09 18:24:08 +02:00
James Cole
3b28b5d07a Fix #7349 2023-04-09 18:23:45 +02:00
James Cole
a7bfa503d9 Merge pull request #7348 from firefly-iii/fix-7347
Fix #7347
2023-04-09 13:45:22 +02:00
James Cole
a7c3d32370 Fix #7347 2023-04-09 13:45:01 +02:00
James Cole
c64ddbec1f Merge tag 'v6.0.7' into develop
v6.0.7
2023-04-08 08:58:40 +02:00
James Cole
6535f86001 Merge branch 'release/v6.0.7' 2023-04-08 08:58:39 +02:00
James Cole
531abc9f3d Merge pull request #7344 from firefly-iii/release-607
Meta for new release
2023-04-08 08:44:21 +02:00
James Cole
f7a02bdc2a Meta for new release 2023-04-08 08:43:41 +02:00
James Cole
af38f31147 Merge branch 'main' into develop 2023-04-08 06:57:40 +02:00
James Cole
4b4b5ef319 Merge pull request #7343 from firefly-iii/dark-mode-button
Dark mode button
2023-04-08 06:56:05 +02:00
James Cole
88fd76f0f1 Dark mode button 2023-04-08 06:55:38 +02:00
James Cole
3d1d064720 Merge pull request #7342 from firefly-iii/fix-7310
Fix #7310
2023-04-08 06:39:54 +02:00
James Cole
9ca8161588 Fix #7310 2023-04-08 06:39:25 +02:00
James Cole
5eb2b2fc5e Merge pull request #7341 from firefly-iii/fix-7311
Fix #7311
2023-04-08 06:29:10 +02:00
James Cole
d991df89c8 Fix #7311 2023-04-08 06:28:45 +02:00
James Cole
49339ea9b0 Merge pull request #7340 from firefly-iii/catch-errors
Catch errors
2023-04-08 06:28:22 +02:00
James Cole
561359b14f Add command to force migrations. 2023-04-07 20:54:15 +02:00
James Cole
79a4eec96e Catch DB errors 2023-04-07 19:33:19 +02:00
James Cole
dd11f98be7 Catch errors in database table create statements. 2023-04-07 18:21:12 +02:00
James Cole
40e2bf7cac Merge pull request #7335 from fengkaijia/patch-1
Fix upload attachment via API
2023-04-07 17:01:08 +02:00
James Cole
73e3a11be9 Merge pull request #7333 from firefly-iii/JC5-patch-1
Update cleanup.yml
2023-04-06 09:12:05 +02:00
James Cole
a180c37c58 Update cleanup.yml
Signed-off-by: James Cole <james@firefly-iii.org>
2023-04-06 09:11:55 +02:00
Kaijia Feng
aff802713e Fix upload attachment via API
Signed-off-by: Kaijia Feng <feng@kaijia.me>
2023-04-06 15:07:35 +08:00
James Cole
ebc7fad1fa Merge pull request #7331 from firefly-iii/error-catching
Various improved error catching.
2023-04-05 20:22:54 +02:00
James Cole
5068fc76c1 Various improved error catching. 2023-04-05 20:22:17 +02:00
James Cole
70b6e39cd7 Merge pull request #7323 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.10
Bump phpstan/phpstan from 1.10.9 to 1.10.10
2023-04-03 08:51:15 +02:00
dependabot[bot]
31fc915b51 Bump phpstan/phpstan from 1.10.9 to 1.10.10
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.9 to 1.10.10.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.10.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.9...1.10.10)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 03:56:30 +00:00
James Cole
dfed56ed1b Merge pull request #7320 from firefly-iii/email-defaults
Better defaults for email.
2023-04-02 19:43:53 +02:00
James Cole
7f6d2877fb Better defaults for email. 2023-04-02 19:43:24 +02:00
James Cole
d9315dcbfe Merge pull request #7319 from firefly-iii/fix-7317
Fix #7317
2023-04-02 19:42:32 +02:00
James Cole
6fbf4ec6f1 Fix #7317 2023-04-02 19:42:06 +02:00
James Cole
2e32acc3c9 Merge pull request #7309 from firefly-iii/fix-7308
Fix https://github.com/firefly-iii/firefly-iii/issues/7308
2023-04-01 10:44:47 +02:00
James Cole
328216534b Fix https://github.com/firefly-iii/firefly-iii/issues/7308 2023-04-01 10:44:09 +02:00
James Cole
dea6e2c83f Merge tag 'v6.0.6' into develop
v6.0.6
2023-04-01 07:51:42 +02:00
1337 changed files with 37348 additions and 24185 deletions

View File

@@ -301,7 +301,6 @@ PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
USE_ENCRYPTION=false USE_ENCRYPTION=false
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1 FIREFLY_III_LAYOUT=v1
# #

View File

@@ -1 +1,2 @@
vendor vendor
.php-cs-fixer.cache

View File

@@ -379,16 +379,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.15.1", "version": "v3.22.0",
"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": "d48755372a113bddb99f749e34805d83f3acfe04" "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d48755372a113bddb99f749e34805d83f3acfe04", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3",
"reference": "d48755372a113bddb99f749e34805d83f3acfe04", "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -412,6 +412,7 @@
"symfony/stopwatch": "^5.4 || ^6.0" "symfony/stopwatch": "^5.4 || ^6.0"
}, },
"require-dev": { "require-dev": {
"facile-it/paraunit": "^1.3 || ^2.0",
"justinrainbow/json-schema": "^5.2", "justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^2.0", "keradus/cli-executor": "^2.0",
"mikey179/vfsstream": "^1.6.11", "mikey179/vfsstream": "^1.6.11",
@@ -463,7 +464,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.15.1" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0"
}, },
"funding": [ "funding": [
{ {
@@ -471,7 +472,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-03-13T23:26:30+00:00" "time": "2023-07-16T23:08:06+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@@ -677,16 +678,16 @@
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "5.0.1", "version": "5.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -732,7 +733,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/diff/issues", "issues": "https://github.com/sebastianbergmann/diff/issues",
"security": "https://github.com/sebastianbergmann/diff/security/policy", "security": "https://github.com/sebastianbergmann/diff/security/policy",
"source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -740,27 +741,27 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-03-23T05:12:41+00:00" "time": "2023-05-01T07:48:21+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.2.8", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.1",
"symfony/deprecation-contracts": "^2.1|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^1.1|^2|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/string": "^5.4|^6.0" "symfony/string": "^5.4|^6.0"
}, },
"conflict": { "conflict": {
@@ -782,12 +783,6 @@
"symfony/process": "^5.4|^6.0", "symfony/process": "^5.4|^6.0",
"symfony/var-dumper": "^5.4|^6.0" "symfony/var-dumper": "^5.4|^6.0"
}, },
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -820,7 +815,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.2.8" "source": "https://github.com/symfony/console/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -836,20 +831,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-29T21:42:15+00:00" "time": "2023-05-29T12:49:39+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.2.1", "version": "v3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
"reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -858,7 +853,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "3.3-dev" "dev-main": "3.4-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@@ -887,7 +882,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -903,28 +898,29 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-01T10:25:55+00:00" "time": "2023-05-23T14:45:45+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.2.8", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa",
"reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.1",
"symfony/event-dispatcher-contracts": "^2|^3" "symfony/event-dispatcher-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<5.4" "symfony/dependency-injection": "<5.4",
"symfony/service-contracts": "<2.5"
}, },
"provide": { "provide": {
"psr/event-dispatcher-implementation": "1.0", "psr/event-dispatcher-implementation": "1.0",
@@ -937,13 +933,9 @@
"symfony/error-handler": "^5.4|^6.0", "symfony/error-handler": "^5.4|^6.0",
"symfony/expression-language": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0",
"symfony/http-foundation": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0",
"symfony/service-contracts": "^1.1|^2|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^5.4|^6.0" "symfony/stopwatch": "^5.4|^6.0"
}, },
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -970,7 +962,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/v6.2.8" "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -986,33 +978,30 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-20T16:06:02+00:00" "time": "2023-04-21T14:41:17+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
"version": "v3.2.1", "version": "v3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git", "url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd" "reference": "a76aed96a42d2b521153fb382d418e30d18b59df"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", "reference": "a76aed96a42d2b521153fb382d418e30d18b59df",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.1",
"psr/event-dispatcher": "^1" "psr/event-dispatcher": "^1"
}, },
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "3.3-dev" "dev-main": "3.4-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@@ -1049,7 +1038,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1" "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1065,20 +1054,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-01T10:32:47+00:00" "time": "2023-05-23T14:45:45+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v6.2.7", "version": "v6.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "82b6c62b959f642d000456f08c6d219d749215b3" "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3", "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae",
"reference": "82b6c62b959f642d000456f08c6d219d749215b3", "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1112,7 +1101,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/v6.2.7" "source": "https://github.com/symfony/filesystem/tree/v6.3.1"
}, },
"funding": [ "funding": [
{ {
@@ -1128,20 +1117,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-14T08:44:56+00:00" "time": "2023-06-01T08:30:39+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v6.2.7", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1176,7 +1165,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/v6.2.7" "source": "https://github.com/symfony/finder/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1192,25 +1181,25 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-16T09:57:23+00:00" "time": "2023-04-02T01:25:41+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v6.2.7", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd",
"reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.1",
"symfony/deprecation-contracts": "^2.1|^3" "symfony/deprecation-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1243,7 +1232,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.2.7" "source": "https://github.com/symfony/options-resolver/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1259,7 +1248,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-14T08:44:56+00:00" "time": "2023-05-12T14:21:09+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -1755,16 +1744,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.2.8", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "75ed64103df4f6615e15a7fe38b8111099f47416" "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628",
"reference": "75ed64103df4f6615e15a7fe38b8111099f47416", "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1796,7 +1785,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/v6.2.8" "source": "https://github.com/symfony/process/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1812,20 +1801,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-09T16:20:02+00:00" "time": "2023-05-19T08:06:44+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
"version": "v3.2.1", "version": "v3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/service-contracts.git",
"reference": "a8c9cedf55f314f3a186041d19537303766df09a" "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
"reference": "a8c9cedf55f314f3a186041d19537303766df09a", "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1835,13 +1824,10 @@
"conflict": { "conflict": {
"ext-psr": "<1.1|>=2" "ext-psr": "<1.1|>=2"
}, },
"suggest": {
"symfony/service-implementation": ""
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "3.3-dev" "dev-main": "3.4-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@@ -1881,7 +1867,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.2.1" "source": "https://github.com/symfony/service-contracts/tree/v3.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1897,25 +1883,25 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-01T10:32:47+00:00" "time": "2023-05-23T14:45:45+00:00"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v6.2.7", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f" "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2",
"reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.1",
"symfony/service-contracts": "^1|^2|^3" "symfony/service-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1943,7 +1929,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/v6.2.7" "source": "https://github.com/symfony/stopwatch/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -1959,20 +1945,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-02-14T08:44:56+00:00" "time": "2023-02-16T10:14:28+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.2.8", "version": "v6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
"reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1983,13 +1969,13 @@
"symfony/polyfill-mbstring": "~1.0" "symfony/polyfill-mbstring": "~1.0"
}, },
"conflict": { "conflict": {
"symfony/translation-contracts": "<2.0" "symfony/translation-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/error-handler": "^5.4|^6.0", "symfony/error-handler": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0",
"symfony/intl": "^6.2", "symfony/intl": "^6.2",
"symfony/translation-contracts": "^2.0|^3.0", "symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0" "symfony/var-exporter": "^5.4|^6.0"
}, },
"type": "library", "type": "library",
@@ -2029,7 +2015,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.2.8" "source": "https://github.com/symfony/string/tree/v6.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -2045,7 +2031,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-20T16:06:02+00:00" "time": "2023-03-21T21:06:29+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@@ -30,7 +30,8 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# clean up php code # clean up php code
cd $SCRIPT_DIR/php-cs-fixer cd $SCRIPT_DIR/php-cs-fixer
composer update composer update --quiet
rm -f .php-cs-fixer.cache
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
cd $SCRIPT_DIR/.. cd $SCRIPT_DIR/..

37
.ci/phpmd.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
#
# phpmd.sh
# Copyright (c) 2023 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/>.
#
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd $SCRIPT_DIR/phpmd
composer update --quiet
./vendor/bin/phpmd \
$SCRIPT_DIR/../app text phpmd.xml \
--exclude $SCRIPT_DIR/../app/resources/** \
--exclude $SCRIPT_DIR/../app/frontend/** \
--exclude $SCRIPT_DIR/../app/public/** \
--exclude $SCRIPT_DIR/../app/vendor/** \
cd $SCRIPT_DIR/..
exit 0

1
.ci/phpmd/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor

5
.ci/phpmd/composer.json Normal file
View File

@@ -0,0 +1,5 @@
{
"require-dev": {
"phpmd/phpmd": "^2.13"
}
}

1012
.ci/phpmd/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

72
.ci/phpmd/phpmd.xml Normal file
View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ phpmd.xml
~ Copyright (c) 2023 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/>.
-->
<ruleset name="pcsg-generated-ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Bla bla</description>
<!--
Commando vanuit firefly directory:
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
-->
<!-- Import the entire controversial code rule set -->
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCasePropertyName" />
</rule>
<!-- clean code -->
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" value="5"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml/NPathComplexity">
<properties>
<property name="minimum" value="128"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<properties>
<property name="minimum" value="40"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
<properties>
<property name="minimum" value="5"/>
</properties>
</rule>
<!-- include clean code manually -->
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />
<rule ref="rulesets/cleancode.xml/ElseExpression" />
<!-- no this one -->
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
</ruleset>

View File

@@ -59,3 +59,5 @@ fi
# restore .env file # restore .env file
mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env
cd $SCRIPT_DIR/..

View File

@@ -1,321 +0,0 @@
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
# Never set it to "testing".
APP_ENV=heroku
# Set to true if you want to see debug information in error screens.
APP_DEBUG=false
# This should be your email address.
# If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE
SITE_OWNER=heroku@example.com
# The encryption key for your sessions. Keep this very secure.
# If you generate a new one all existing attachments must be considered LOST.
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2
#
# Firefly III will launch using this language (for new users and unauthenticated visitors)
# For a list of available languages: https://github.com/firefly-iii/firefly-iii/tree/main/resources/lang
#
# If text is still in English, remember that not everything may have been translated.
DEFAULT_LANGUAGE=en_US
# The locale defines how numbers are formatted.
# by default this value is the same as whatever the language is.
DEFAULT_LOCALE=equal
# Change this value to your preferred time zone.
# Example: Europe/Amsterdam
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=UTC
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
# Set it to ** and reverse proxies work just fine.
TRUSTED_PROXIES=**
# The log channel defines where your log entries go to.
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
# - Docker + versions <= 4.8.1.8 and before: use "stdout"
# - Docker + versions > 4.8.1.8 : use "docker_out"
# - Docker + versions >= 5.1.1 : use "stack"
# - For everything else (als not Docker) : use 'stack'
LOG_CHANNEL=stdout
# Log level. You can set this from least severe to most severe:
# debug, info, notice, warning, error, critical, alert, emergency
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
# nothing will get logged, ever.
APP_LOG_LEVEL=notice
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
# Use "pgsql" for PostgreSQL
# Use "mysql" for MySQL and MariaDB.
# Use "sqlite" for SQLite.
DB_CONNECTION=pgsql
# MySQL supports SSL. You can configure it here.
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MYSQL_USE_SSL=false
MYSQL_SSL_VERIFY_SERVER_CERT=true
# You need to set at least of these options
MYSQL_SSL_CAPATH=/etc/ssl/certs/
MYSQL_SSL_CA=
MYSQL_SSL_CERT=
MYSQL_SSL_KEY=
MYSQL_SSL_CIPHER=
# PostgreSQL supports SSL. You can configure it here.
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
PGSQL_SSL_MODE=prefer
PGSQL_SSL_ROOT_CERT=null
PGSQL_SSL_CERT=null
PGSQL_SSL_KEY=null
PGSQL_SSL_CRL_FILE=null
# If you're looking for performance improvements, you could install memcached.
CACHE_DRIVER=file
SESSION_DRIVER=file
# If you set either of these to 'redis', you might want to update these settings too
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
# can be tcp, unix or http
REDIS_SCHEME=tcp
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
REDIS_PATH=
# use only when using 'tcp' or 'http' for REDIS_SCHEME. Leave empty otherwise.
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=null
# always use quotes and make sure redis db "0" and "1" exists. Otherwise change accordingly.
REDIS_DB="0"
REDIS_CACHE_DB="1"
# Cookie settings. Should not be necessary to change these.
# If you use Docker or similar, you can set COOKIE_DOMAIN_FILE to set
# the value from a file instead of from an environment variable
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
# If you want Firefly III to mail you, update these settings
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MAIL_MAILER=log
MAIL_HOST=null
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
# Other mail drivers:
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MAILGUN_DOMAIN=
MAILGUN_SECRET=
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
MAILGUN_ENDPOINT=api.mailgun.net
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MANDRILL_SECRET=
SPARKPOST_SECRET=
# Firefly III can send you the following messages
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
# These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
MAPBOX_API_KEY=
# The map will default to this location:
MAP_DEFAULT_LAT=51.983333
MAP_DEFAULT_LONG=5.916667
MAP_DEFAULT_ZOOM=6
# Firefly III currently supports two provider for live Currency Exchange Rates:
# "fixer", and "ratesapi".
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
CER_PROVIDER=ratesapi
# If you have select "fixer" as default currency exchange rates,
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited
# the free API up to the point where you might as well offer nothing.
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
FIXER_API_KEY=
# Firefly III has two options for user authentication. "eloquent" is the default,
# and "ldap" for LDAP servers.
# For full instructions on these settings please visit:
# https://docs.firefly-iii.org/advanced-installation/authentication
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
LOGIN_PROVIDER=eloquent
#
# It's also possible to change the way users are authenticated. You could use Authelia for example.
# Authentication via the REMOTE_USER header is supported. Change the value below to "remote_user_guard".
#
# If you do this please read the documentation for instructions and warnings:
# https://docs.firefly-iii.org/advanced-installation/authentication
#
# This function is available in Firefly III v5.3.0 and higher.
AUTHENTICATION_GUARD=web
#
# Likewise, it's impossible to log out users who's authentication is handled by an external system.
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
# Setting this variable only works when AUTHENTICATION_GUARD != web
#
CUSTOM_LOGOUT_URL=
# LDAP connection configuration
# OpenLDAP, FreeIPA or ActiveDirectory
# # If you use Docker or similar, you can set this variable from a file by appending it with _FILE
ADLDAP_CONNECTION_SCHEME=OpenLDAP
ADLDAP_AUTO_CONNECT=true
# LDAP connection settings
# You can set the following variables from a file by appending them with _FILE:
# ADLDAP_CONTROLLERS, ADLDAP_PORT, ADLDAP_BASEDN
ADLDAP_CONTROLLERS=
ADLDAP_PORT=389
ADLDAP_TIMEOUT=5
ADLDAP_BASEDN=""
ADLDAP_FOLLOW_REFFERALS=false
# SSL/TLS settings
ADLDAP_USE_SSL=false
ADLDAP_USE_TLS=false
ADLDAP_SSL_CACERTDIR=
ADLDAP_SSL_CACERTFILE=
ADLDAP_SSL_CERTFILE=
ADLDAP_SSL_KEYFILE=
ADLDAP_SSL_CIPHER_SUITE=
ADLDAP_SSL_REQUIRE_CERT=
# You can set the following variables from a file by appending them with _FILE:
ADLDAP_ADMIN_USERNAME=
ADLDAP_ADMIN_PASSWORD=
# You can set the following variables from a file by appending them with _FILE:
ADLDAP_ACCOUNT_PREFIX=
ADLDAP_ACCOUNT_SUFFIX=
# LDAP authentication settings.
ADLDAP_PASSWORD_SYNC=false
ADLDAP_LOGIN_FALLBACK=false
ADLDAP_DISCOVER_FIELD=distinguishedname
ADLDAP_AUTH_FIELD=distinguishedname
# Will allow SSO if your server provides an AUTH_USER field.
# You can set the following variables from a file by appending them with _FILE:
WINDOWS_SSO_ENABLED=false
WINDOWS_SSO_DISCOVER=samaccountname
WINDOWS_SSO_KEY=AUTH_USER
# field to sync as local username.
# You can set the following variable from a file by appending it with _FILE:
ADLDAP_SYNC_FIELD=userprincipalname
# You can disable the X-Frame-Options header if it interferes with tools like
# Organizr. This is at your own risk. Applications running in frames run the risk
# of leaking information to their parent frame.
DISABLE_FRAME_HEADER=false
# You can disable the Content Security Policy header when you're using an ancient browser
# or any version of Microsoft Edge / Internet Explorer (which amounts to the same thing really)
# This leaves you with the risk of not being able to stop XSS bugs should they ever surface.
# This is at your own risk.
DISABLE_CSP_HEADER=false
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
# Nobody uses this except for me on the demo site. But hey, feel free to use this if you want to.
# Do not prepend the TRACKER_URL with http:// or https://
# The only tracker supported is Matomo.
# You can set the following variables from a file by appending them with _FILE:
TRACKER_SITE_ID=
TRACKER_URL=
# You can fine tune the start-up of a Docker container by editing these environment variables.
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
# However if you know what you're doing you can significantly speed up container start times.
# Set each value to true to enable, or false to disable.
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
# Won't significantly speed up things.
DKR_CHECK_SQLITE=true
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
# and is up to date.
DKR_RUN_MIGRATION=true
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
# with the latest fixes (outside of migrations!)
DKR_RUN_UPGRADE=true
# Verify database integrity. Includes all data checks and verifications.
# Disabling this makes Firefly III assume your DB is intact.
DKR_RUN_VERIFY=true
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
DKR_RUN_REPORT=true
# Generate OAuth2 keys.
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
# you had previously generated keys already and they're stored in your database for restoration.
DKR_RUN_PASSPORT_INSTALL=true
# Leave the following configuration vars as is.
# Unless you like to tinker and know what you're doing.
APP_NAME=FireflyIII
ADLDAP_CONNECTION=default
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
CACHE_PREFIX=firefly
SEARCH_RESULT_LIMIT=50
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
USE_ENCRYPTION=false
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1
#
# If you have trouble configuring your Firefly III installation, DON'T BOTHER setting this variable.
# It won't work. It doesn't do ANYTHING. Don't believe the lies you read online. I'm not joking.
# This configuration value WILL NOT HELP.
#
# This variable is ONLY used in some of the emails Firefly III sends around. Nowhere else.
# So when configuring anything WEB related this variable doesn't do anything. Nothing
#
# If you're stuck I understand you get desperate but look SOMEWHERE ELSE.
#
APP_URL=http://localhost

View File

@@ -1,30 +0,0 @@
bg_BG
ca_ES
cs_CZ
da_DK
de_DE
el_GR
en_GB
en_US
es_ES
fi_FI
fr_FR
hu_HU
id_ID
it_IT
ja_JP
nb_NO
nl_NL
pl_PL
pt_BR
pt_PT
ro_RO
ru_RU
sk_SK
sl_SI
sv_SE
tr_TR
uk_UA
vi_VN
zh-hans_CN
zh-hant_CN

View File

@@ -62,7 +62,7 @@ APP_LOG_LEVEL=notice
AUDIT_LOG_LEVEL=info AUDIT_LOG_LEVEL=info
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III # Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq # For other database types, please see the FAQ: https://docs.firefly-iii.org/firefly-iii/faq/self-hosted/#i-want-to-use-sqlite
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE # If you use Docker or similar, you can set these variables from a file by appending them with _FILE
# Use "pgsql" for PostgreSQL # Use "pgsql" for PostgreSQL
# Use "mysql" for MySQL and MariaDB. # Use "mysql" for MySQL and MariaDB.
@@ -134,7 +134,7 @@ COOKIE_SECURE=false
COOKIE_SAMESITE=lax COOKIE_SAMESITE=lax
# If you want Firefly III to email you, update these settings # If you want Firefly III to email you, update these settings
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email # For instructions, see: https://docs.firefly-iii.org/firefly-iii/advanced-installation/email/#email
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE # If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MAIL_MAILER=log MAIL_MAILER=log
MAIL_HOST=null MAIL_HOST=null
@@ -143,6 +143,7 @@ MAIL_FROM=changeme@example.com
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
MAIL_SENDMAIL_COMMAND=
# Other mail drivers: # Other mail drivers:
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE # If you use Docker or similar, you can set these variables from a file by appending them with _FILE
@@ -163,9 +164,8 @@ SEND_ERROR_MESSAGE=true
# These messages contain (sensitive) transaction information: # These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true SEND_REPORT_JOURNALS=true
# Set this value to true if you want to set the location # Set this value to true if you want to set the location of certain things, like transactions.
# of certain things, like transactions. Since this involves an external service, it's optional # Since this involves an external service, it's optional and disabled by default.
# and disabled by default.
ENABLE_EXTERNAL_MAP=false ENABLE_EXTERNAL_MAP=false
# Set this value to true if you want Firefly III to download currency exchange rates # Set this value to true if you want Firefly III to download currency exchange rates
@@ -188,7 +188,7 @@ MAP_DEFAULT_ZOOM=6
# - 'web' (default, uses built in DB) # - 'web' (default, uses built in DB)
# - 'remote_user_guard' for Authelia etc # - 'remote_user_guard' for Authelia etc
# Read more about these settings in the documentation. # Read more about these settings in the documentation.
# https://docs.firefly-iii.org/advanced-installation/authentication # https://docs.firefly-iii.org/firefly-iii/advanced-installation/authentication
# #
# LDAP is no longer supported :( # LDAP is no longer supported :(
# #
@@ -241,7 +241,7 @@ 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!).
# 2. Use this token in the cron URL instead of a user's command line token. # 2. Use this token in the cron URL instead of a user's command line token that you can find in /profile
# #
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/ # For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
# #
@@ -298,7 +298,6 @@ PUSHER_SECRET=
PUSHER_ID= PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1 FIREFLY_III_LAYOUT=v1
# #

View File

@@ -2,7 +2,10 @@
## Our Pledge ## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards ## Our Standards
@@ -24,23 +27,35 @@ Examples of unacceptable behavior by participants include:
## Our Responsibilities ## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope ## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.
## Attribution ## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org [homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/ [version]: http://contributor-covenant.org/version/1/4/

View File

@@ -1,3 +1,3 @@
# [Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing) # [Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)
[Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing) [Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)

View File

@@ -2,9 +2,11 @@
Sometimes bugs reported to Firefly III are configuration and system problems on the user's side. Sometimes bugs reported to Firefly III are configuration and system problems on the user's side.
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration issue. If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration
issue.
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's correct. - ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's
correct.
- ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems - ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems
- ⚠️ You can't login due to `419` errors (page expired) - ⚠️ You can't login due to `419` errors (page expired)
- ⚠️ Any `500` error when starting Firefly III - ⚠️ Any `500` error when starting Firefly III
@@ -13,4 +15,6 @@ If you run into any of the following problems, there's a good chance it's not a
- ⚠️ Firefly III does not work behind your reverse proxy - ⚠️ Firefly III does not work behind your reverse proxy
- ⚠️ You can't connect to the Data Importer due to 404's or authentication issues. - ⚠️ You can't connect to the Data Importer due to 404's or authentication issues.
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions) or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we can fix rather quickly :+1: If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions)
or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we
can fix rather quickly :+1:

6
.github/support.md vendored
View File

@@ -9,7 +9,8 @@ First of all: thank you for reporting a bug instead of ditching the tool altoget
1. Open bugs will have open issues, so search for one first. 1. Open bugs will have open issues, so search for one first.
2. If your feature request is already there, vote on it with :+1: or :-1: reactions. 2. If your feature request is already there, vote on it with :+1: or :-1: reactions.
3. Do NOT hijack old issues with the bug you found, open your own issue. 3. Do NOT hijack old issues with the bug you found, open your own issue.
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your issue. 4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your
issue.
5. If relevant, read the [documentation](https://docs.firefly-iii.org/). 5. If relevant, read the [documentation](https://docs.firefly-iii.org/).
Please follow these guidelines when opening new issues: Please follow these guidelines when opening new issues:
@@ -25,7 +26,8 @@ Only then [create a new issue](https://github.com/firefly-iii/firefly-iii/issues
## Issue closure and abandonment policy ## Issue closure and abandonment policy
- Issues can be converted into discussions if it's not a bug or feature request. - Issues can be converted into discussions if it's not a bug or feature request.
- Features that won't be implemented will be labelled "wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/). - Features that won't be implemented will be labelled "
wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
- Issues can be closed if they're duplicates of other issues. - Issues can be closed if they're duplicates of other issues.
- Issues can be closed if the answer is in the FAQ. - Issues can be closed if the answer is in the FAQ.
- Issues will be closed automatically after 14 days. - Issues will be closed automatically after 14 days.

View File

@@ -55,11 +55,13 @@ jobs:
// because we track the duration of runs over time // because we track the duration of runs over time
const workflows = [ const workflows = [
'build.yml',
'cleanup.yml', 'cleanup.yml',
'closed-issues.yml',
'depsreview.yaml', 'depsreview.yaml',
'laravel.yml', 'laravel.yml',
'lock.yml', 'lock.yml',
'qodana.yml',
'sonarcloud.yml',
'stale.yml' 'stale.yml'
] ]

View File

@@ -7,16 +7,16 @@ jobs:
auto_comment: auto_comment:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- - uses: aws-actions/closed-issue-message@v1
uses: aws-actions/closed-issue-message@v1
with: with:
message: | message: |
Hi there! This is an automatic reply. `Share and enjoy` Hi there! This is an automatic reply. `Share and enjoy`
This issue is now closed. Please be aware that closed issues are not actively monitored. If you reply, you may get no response. This issue is now 🔒 closed. Please be aware that closed issues are **not** watched.
- If the original bug is not actually fixed, please feel free to open a new issue. Please refer to this issue for clarity. - If the original bug is not actually fixed, please feel free to open [a new issue](https://github.com/firefly-iii/firefly-iii/issues/new/choose). Please refer to this issue for clarity.
- Follow-up questions can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/) - Follow-up questions must be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
- Further replies to this issue will get **no response**.
Thank you for your consideration. Thank you for your contributions.
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -5,26 +5,15 @@ on:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
permissions:
contents: read
jobs: jobs:
lock: lock:
permissions: permissions:
issues: write # for dessant/lock-threads to lock issues issues: write
pull-requests: write # for dessant/lock-threads to lock PRs pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dessant/lock-threads@v4 - uses: JC5/lock-threads@main
with: with:
github-token: ${{ github.token }} github-token: ${{ github.token }}
issue-lock-inactive-days: '90' issue-inactive-days: 90
issue-comment: > pr-inactive-days: 90
Hi there! This is an automatic reply. `Share and enjoy`
This issue is now `locked` :lock:.
- If you feel there is more to be said about this specific issue, please feel free to open a new issue. Please refer to this issue for clarity.
- Follow-up questions and comments can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
Thank you for your consideration.

View File

@@ -5,8 +5,6 @@ on:
branches: branches:
- main - main
- develop - develop
pull_request:
types: [ opened, synchronize, reopened ]
jobs: jobs:
qodana: qodana:
runs-on: ubuntu-latest runs-on: ubuntu-latest

47
.github/workflows/sonarcloud.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Sonarcloud
on:
pull_request:
push:
branches:
- main
- develop
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: xdebug
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts
- name: Copy environment file
run: cp .env.example .env
- name: Generate app key
run: php artisan key:generate
- name: "Run tests with coverage"
run: composer coverage
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -31,4 +31,4 @@ jobs:
Thank you for your contributions. Thank you for your contributions.
days-before-stale: 14 days-before-stale: 14
days-before-close: 7 days-before-close: 7
exempt-issue-labels: 'enhancement,feature,bug,announcement,layout-v3' exempt-issue-labels: 'enhancement,feature,bug,announcement,epic'

2
.gitignore vendored
View File

@@ -7,4 +7,4 @@ npm-debug.log
yarn-error.log yarn-error.log
.env .env
/.ci/php-cs-fixer/vendor /.ci/php-cs-fixer/vendor
/.ci/coverage coverage.xml

View File

@@ -1,65 +0,0 @@
{
"name": "Firefly III",
"description": "A free and open source personal finances manager",
"repository": "https://github.com/firefly-iii/firefly-iii",
"website": "https://firefly-iii.org/",
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/public/mstile-150x150.png",
"keywords": [
"finance",
"finances",
"manager",
"management",
"euro",
"dollar",
"laravel",
"money",
"currency",
"financials",
"financial",
"budgets",
"administration",
"tool",
"tooling",
"help",
"helper",
"assistant",
"planning",
"organizing",
"bills",
"personal finance",
"budgets",
"budgeting",
"budgeting tool",
"budgeting application",
"transactions",
"self hosted",
"self-hosted",
"transfers",
"management"
],
"addons": [
{
"plan": "heroku-postgresql",
"options": {
"version": "12"
}
}
],
"scripts": {
"postdeploy": "php artisan migrate:refresh --seed;php artisan firefly:instructions install"
},
"buildpacks": [
{
"url": "heroku/php"
},
{
"url": "https://github.com/heroku/heroku-buildpack-locale"
}
],
"env": {
"APP_KEY": {
"description": "This key is used to create app cookies en secure attachments.",
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
}
}
}

View File

@@ -83,6 +83,7 @@ class AccountController extends Controller
$return = []; $return = [];
$result = $this->repository->searchAccount((string)$query, $types, $data['limit']); $result = $this->repository->searchAccount((string)$query, $types, $data['limit']);
// TODO this code is duplicated in the V2 Autocomplete controller, which means this code is due to be deprecated.
$defaultCurrency = app('amount')->getDefaultCurrency(); $defaultCurrency = app('amount')->getDefaultCurrency();
/** @var Account $account */ /** @var Account $account */
@@ -92,7 +93,11 @@ class AccountController extends Controller
if (in_array($account->accountType->type, $this->balanceTypes, true)) { if (in_array($account->accountType->type, $this->balanceTypes, true)) {
$balance = app('steam')->balance($account, $date); $balance = app('steam')->balance($account, $date);
$nameWithBalance = sprintf('%s (%s)', $account->name, app('amount')->formatAnything($currency, $balance, false)); $nameWithBalance = sprintf(
'%s (%s)',
$account->name,
app('amount')->formatAnything($currency, $balance, false)
);
} }
$return[] = [ $return[] = [
@@ -109,14 +114,14 @@ class AccountController extends Controller
} }
// custom order. // custom order.
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
usort( usort(
$return, $return,
function ($a, $b) use ($order) { function ($a, $b) {
$pos_a = array_search($a['type'], $order, true); $order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
$pos_b = array_search($b['type'], $order, true); $posA = array_search($a['type'], $order, true);
$posB = array_search($b['type'], $order, true);
return $pos_a - $pos_b; return $posA - $posB;
} }
); );

View File

@@ -125,6 +125,7 @@ class AccountController extends Controller
'yAxisID' => 0, // 0, 1, 2 'yAxisID' => 0, // 0, 1, 2
'entries' => [], 'entries' => [],
]; ];
// TODO this code is also present in the V2 chart account controller so this method is due to be deprecated.
$currentStart = clone $start; $currentStart = clone $start;
$range = app('steam')->balanceInRange($account, $start, clone $end); $range = app('steam')->balanceInRange($account, $start, clone $end);
// 2022-10-11 this method no longer converts to float. // 2022-10-11 this method no longer converts to float.

View File

@@ -85,12 +85,11 @@ abstract class Controller extends BaseController
{ {
$bag = new ParameterBag(); $bag = new ParameterBag();
$page = (int)request()->get('page'); $page = (int)request()->get('page');
if ($page < 1) { if ($page < 1) {
$page = 1; $page = 1;
} }
if ($page > (2 ^ 16)) { if ($page > pow(2, 16)) {
$page = (2 ^ 16); $page = pow(2, 16);
} }
$bag->set('page', $page); $bag->set('page', $page);
@@ -111,7 +110,13 @@ abstract class Controller extends BaseController
$obj = Carbon::parse($date); $obj = Carbon::parse($date);
} catch (InvalidDateException | InvalidFormatException $e) { } catch (InvalidDateException | InvalidFormatException $e) {
// don't care // don't care
app('log')->warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', substr($date, 0, 20), $e->getMessage())); app('log')->warning(
sprintf(
'Ignored invalid date "%s" in API controller parameter check: %s',
substr($date, 0, 20),
$e->getMessage()
)
);
} }
} }
$bag->set($field, $obj); $bag->set($field, $obj);
@@ -171,7 +176,6 @@ abstract class Controller extends BaseController
return $bag; return $bag;
} }
/** /**
* Method to help build URL's. * Method to help build URL's.
* *

View File

@@ -279,6 +279,9 @@ class DestroyController extends Controller
$tagRepository->destroyAll(); $tagRepository->destroyAll();
} }
/**
* @return void
*/
private function destroyObjectGroups(): void private function destroyObjectGroups(): void
{ {
/** @var ObjectGroupRepositoryInterface $repository */ /** @var ObjectGroupRepositoryInterface $repository */

View File

@@ -29,6 +29,8 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Support\Export\ExportDataGenerator; use FireflyIII\Support\Export\ExportDataGenerator;
use Illuminate\Http\Response as LaravelResponse; use Illuminate\Http\Response as LaravelResponse;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class ExportController * Class ExportController
@@ -74,6 +76,8 @@ class ExportController extends Controller
* *
* @return LaravelResponse * @return LaravelResponse
* @throws FireflyException * @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function returnExport(string $key): LaravelResponse private function returnExport(string $key): LaravelResponse
{ {

View File

@@ -37,12 +37,16 @@ use FireflyIII\Models\TransactionGroup;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
/**
* Class PurgeController
*/
class PurgeController extends Controller class PurgeController extends Controller
{ {
/** /**
* TODO cleanup and use repositories. * TODO cleanup and use repositories.
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData
*
* @return JsonResponse * @return JsonResponse
*/ */
public function purge(): JsonResponse public function purge(): JsonResponse

View File

@@ -29,8 +29,8 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Transformers\AccountTransformer; use FireflyIII\Transformers\AccountTransformer;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item;
use Preferences; use Preferences;
/** /**

View File

@@ -34,8 +34,8 @@ use FireflyIII\Transformers\AttachmentTransformer;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use League\Fractal\Resource\Item;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item;
/** /**
* Class StoreController * Class StoreController

View File

@@ -24,7 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit; namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Data\DateRequest; use FireflyIII\Api\V1\Requests\Data\SameDateRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Budget; use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
@@ -108,12 +108,12 @@ class ShowController extends Controller
* *
* Display a listing of the budget limits for this budget. * Display a listing of the budget limits for this budget.
* *
* @param DateRequest $request * @param SameDateRequest $request
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function indexAll(DateRequest $request): JsonResponse public function indexAll(SameDateRequest $request): JsonResponse
{ {
$manager = $this->getManager(); $manager = $this->getManager();
$manager->parseIncludes('budget'); $manager->parseIncludes('budget');

View File

@@ -96,6 +96,7 @@ class TriggerController extends Controller
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]); $ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
} }
// file the rule(s) // file the rule(s)
$transactions = $ruleEngine->find(); $transactions = $ruleEngine->find();
$count = $transactions->count(); $count = $transactions->count();
@@ -149,6 +150,7 @@ class TriggerController extends Controller
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]); $ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
} }
// fire the rule(s) // fire the rule(s)
$ruleEngine->fire(); $ruleEngine->fire();

View File

@@ -35,9 +35,9 @@ use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\Transformers\TransactionGroupTransformer;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Illuminate\Support\Facades\Log;
use Validator; use Validator;
/** /**

View File

@@ -32,8 +32,8 @@ use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface
use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\Transformers\TransactionGroupTransformer;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/** /**

View File

@@ -30,6 +30,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
/**
* Class DestroyController
*/
class DestroyController extends Controller class DestroyController extends Controller
{ {
private LinkTypeRepositoryInterface $repository; private LinkTypeRepositoryInterface $repository;

View File

@@ -37,6 +37,9 @@ 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;
/**
* Class ShowController
*/
class ShowController extends Controller class ShowController extends Controller
{ {
private LinkTypeRepositoryInterface $repository; private LinkTypeRepositoryInterface $repository;

View File

@@ -35,6 +35,9 @@ use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class StoreController
*/
class StoreController extends Controller class StoreController extends Controller
{ {
use TransactionFilter; use TransactionFilter;

View File

@@ -34,6 +34,9 @@ use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class UpdateController
*/
class UpdateController extends Controller class UpdateController extends Controller
{ {
private JournalRepositoryInterface $journalRepository; private JournalRepositoryInterface $journalRepository;

View File

@@ -32,10 +32,9 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
use JsonException; use Illuminate\Support\Facades\Log;
use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use Illuminate\Support\Facades\Log;
/** /**
* Class AccountController * Class AccountController
@@ -61,12 +60,12 @@ class AccountController extends Controller
/** /**
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchAccounts * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchAccounts
*
* @param Request $request * @param Request $request
* *
* @return JsonResponse|Response * @return JsonResponse|Response
* @throws JsonException
*/ */
public function search(Request $request) public function search(Request $request): JsonResponse | Response
{ {
Log::debug('Now in account search()'); Log::debug('Now in account search()');
$manager = $this->getManager(); $manager = $this->getManager();

View File

@@ -71,6 +71,8 @@ class TransactionController extends Controller
$resource = new Collection($transactions, $transformer, 'transactions'); $resource = new Collection($transactions, $transformer, 'transactions');
$resource->setPaginator(new IlluminatePaginatorAdapter($groups)); $resource->setPaginator(new IlluminatePaginatorAdapter($groups));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE); $array = $manager->createData($resource)->toArray();
return response()->json($array)->header('Content-Type', self::CONTENT_TYPE);
} }
} }

View File

@@ -240,44 +240,43 @@ class BasicController extends Controller
* Since both this method and the chart use the exact same data, we can suffice * Since both this method and the chart use the exact same data, we can suffice
* with calling the one method in the bill repository that will get this amount. * with calling the one method in the bill repository that will get this amount.
*/ */
$paidAmount = $this->billRepository->getBillsPaidInRangePerCurrency($start, $end); $paidAmount = $this->billRepository->sumPaidInRange($start, $end);
$unpaidAmount = $this->billRepository->getBillsUnpaidInRangePerCurrency($start, $end); $unpaidAmount = $this->billRepository->sumUnpaidInRange($start, $end);
$return = []; $return = [];
foreach ($paidAmount as $currencyId => $amount) { /**
$amount = bcmul($amount, '-1'); * @var array $info
$currency = $this->currencyRepos->find((int)$currencyId); */
if (null === $currency) { foreach ($paidAmount as $info) {
continue; $amount = bcmul($info['sum'], '-1');
}
$return[] = [ $return[] = [
'key' => sprintf('bills-paid-in-%s', $currency->code), 'key' => sprintf('bills-paid-in-%s', $info['code']),
'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $currency->symbol]), 'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $info['symbol']]),
'monetary_value' => $amount, 'monetary_value' => $amount,
'currency_id' => $currency->id, 'currency_id' => $info['id'],
'currency_code' => $currency->code, 'currency_code' => $info['code'],
'currency_symbol' => $currency->symbol, 'currency_symbol' => $info['symbol'],
'currency_decimal_places' => $currency->decimal_places, 'currency_decimal_places' => $info['decimal_places'],
'value_parsed' => app('amount')->formatAnything($currency, $amount, false), 'value_parsed' => app('amount')->formatFlat($info['symbol'], $info['decimal_places'], $amount, false),
'local_icon' => 'check', 'local_icon' => 'check',
'sub_title' => '', 'sub_title' => '',
]; ];
} }
foreach ($unpaidAmount as $currencyId => $amount) { /**
$amount = bcmul($amount, '-1'); * @var array $info
$currency = $this->currencyRepos->find((int)$currencyId); */
if (null === $currency) { foreach ($unpaidAmount as $info) {
continue; $amount = bcmul($info['sum'], '-1');
}
$return[] = [ $return[] = [
'key' => sprintf('bills-unpaid-in-%s', $currency->code), 'key' => sprintf('bills-unpaid-in-%s', $info['code']),
'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $currency->symbol]), 'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $info['symbol']]),
'monetary_value' => $amount, 'monetary_value' => $amount,
'currency_id' => $currency->id, 'currency_id' => $info['id'],
'currency_code' => $currency->code, 'currency_code' => $info['code'],
'currency_symbol' => $currency->symbol, 'currency_symbol' => $info['symbol'],
'currency_decimal_places' => $currency->decimal_places, 'currency_decimal_places' => $info['decimal_places'],
'value_parsed' => app('amount')->formatAnything($currency, $amount, false), 'value_parsed' => app('amount')->formatFlat($info['symbol'], $info['decimal_places'], $amount, false),
'local_icon' => 'calendar-o', 'local_icon' => 'calendar-o',
'sub_title' => '', 'sub_title' => '',
]; ];

View File

@@ -138,7 +138,6 @@ class ConfigurationController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function show(string $configKey): JsonResponse public function show(string $configKey): JsonResponse

View File

@@ -28,6 +28,8 @@ 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 Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class CronController * Class CronController
@@ -44,6 +46,8 @@ class CronController extends Controller
* @param string $token * @param string $token
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function cron(CronRequest $request, string $token): JsonResponse public function cron(CronRequest $request, string $token): JsonResponse
{ {
@@ -54,6 +58,10 @@ 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.enabled')) {
$return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']);
}
$return['bill_warnings'] = $this->billWarningCronJob($config['force'], $config['date']);
return response()->json($return); return response()->json($return);
} }

View File

@@ -35,6 +35,9 @@ 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;
/**
* Class MessageController
*/
class MessageController extends Controller class MessageController extends Controller
{ {
public const RESOURCE_KEY = 'webhook_messages'; public const RESOURCE_KEY = 'webhook_messages';

View File

@@ -122,10 +122,12 @@ class ShowController extends Controller
* *
* @param Webhook $webhook * @param Webhook $webhook
* @param TransactionGroup $group * @param TransactionGroup $group
*
* @return JsonResponse * @return JsonResponse
*/ */
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
{ {
app('log')->debug(sprintf('Now in triggerTransaction(%d, %d)', $webhook->id, $group->id));
/** @var MessageGeneratorInterface $engine */ /** @var MessageGeneratorInterface $engine */
$engine = app(MessageGeneratorInterface::class); $engine = app(MessageGeneratorInterface::class);
$engine->setUser(auth()->user()); $engine->setUser(auth()->user());
@@ -140,7 +142,9 @@ class ShowController extends Controller
$engine->generateMessages(); $engine->generateMessages();
// trigger event to send them: // trigger event to send them:
app('log')->debug('send event RequestedSendWebhookMessages');
event(new RequestedSendWebhookMessages()); event(new RequestedSendWebhookMessages());
return response()->json([], 204); return response()->json([], 204);
} }
} }

View File

@@ -83,6 +83,7 @@ class MoveTransactionsRequest extends FormRequest
/** /**
* @param Validator $validator * @param Validator $validator
*
* @return void * @return void
*/ */
private function validateMove(Validator $validator): void private function validateMove(Validator $validator): void

View File

@@ -30,9 +30,9 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Validation\Api\Data\Bulk\ValidatesBulkTransactionQuery; use FireflyIII\Validation\Api\Data\Bulk\ValidatesBulkTransactionQuery;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Validator; use Illuminate\Validation\Validator;
use JsonException; use JsonException;
use Illuminate\Support\Facades\Log;
/** /**
* Class TransactionRequest * Class TransactionRequest

View File

@@ -57,7 +57,7 @@ class DestroyRequest extends FormRequest
',not_assets_liabilities'; ',not_assets_liabilities';
return [ return [
'objects' => sprintf('required|min:1|string|in:%s', $valid), 'objects' => sprintf('required|max:255|min:1|string|in:%s', $valid),
'unused' => 'in:true,false', 'unused' => 'in:true,false',
]; ];
} }

View File

@@ -38,6 +38,9 @@ class ExportRequest extends FormRequest
use ChecksLogin; use ChecksLogin;
use ConvertsDataTypes; use ConvertsDataTypes;
/**
* @return array
*/
public function getAll(): array public function getAll(): array
{ {
$result = [ $result = [
@@ -73,7 +76,7 @@ class ExportRequest extends FormRequest
{ {
return [ return [
'type' => 'in:csv', 'type' => 'in:csv',
'accounts' => 'min:1', 'accounts' => 'min:1|max:65536',
'start' => 'date|before:end', 'start' => 'date|before:end',
'end' => 'date|after:start', 'end' => 'date|after:start',
]; ];

View File

@@ -0,0 +1,66 @@
<?php
/*
* DateRequest.php
* Copyright (c) 2021 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\Data;
use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest;
/**
* Request class for end points that require date parameters.
*
* Class SameDateRequest
*/
class SameDateRequest extends FormRequest
{
use ConvertsDataTypes;
use ChecksLogin;
/**
* Get all data from the request.
*
* @return array
*/
public function getAll(): array
{
return [
'start' => $this->getCarbonDate('start'),
'end' => $this->getCarbonDate('end'),
];
}
/**
* The rules that the incoming request must be matched against.
*
* @return array
*/
public function rules(): array
{
return [
'start' => 'required|date',
'end' => 'required|date|after_or_equal:start',
];
}
}

View File

@@ -103,8 +103,8 @@ class StoreRequest extends FormRequest
$ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes'))); $ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes')));
$type = $this->convertString('type'); $type = $this->convertString('type');
$rules = [ $rules = [
'name' => 'required|min:1|uniqueAccountForUser', 'name' => 'required|max:1024|min:1|uniqueAccountForUser',
'type' => 'required|min:1|'.sprintf('in:%s', $types), 'type' => 'required|max:1024|min:1|' . sprintf('in:%s', $types),
'iban' => ['iban', 'nullable', new UniqueIban(null, $type)], 'iban' => ['iban', 'nullable', new UniqueIban(null, $type)],
'bic' => 'bic|nullable', 'bic' => 'bic|nullable',
'account_number' => ['between:1,255', 'nullable', new UniqueAccountNumber(null, $type)], 'account_number' => ['between:1,255', 'nullable', new UniqueAccountNumber(null, $type)],
@@ -120,7 +120,7 @@ class StoreRequest extends FormRequest
'credit_card_type' => sprintf('nullable|in:%s|required_if:account_role,ccAsset', $ccPaymentTypes), 'credit_card_type' => sprintf('nullable|in:%s|required_if:account_role,ccAsset', $ccPaymentTypes),
'monthly_payment_date' => 'nullable|date|required_if:account_role,ccAsset|required_if:credit_card_type,monthlyFull', 'monthly_payment_date' => 'nullable|date|required_if:account_role,ccAsset|required_if:credit_card_type,monthlyFull',
'liability_type' => 'nullable|required_if:type,liability|required_if:type,liabilities|in:loan,debt,mortgage', 'liability_type' => 'nullable|required_if:type,liability|required_if:type,liabilities|in:loan,debt,mortgage',
'liability_amount' => 'required_with:liability_start_date|min:0|numeric', 'liability_amount' => 'required_with:liability_start_date|min:0|numeric|max:1000000000',
'liability_start_date' => 'required_with:liability_amount|date', 'liability_start_date' => 'required_with:liability_amount|date',
'liability_direction' => 'nullable|required_if:type,liability|required_if:type,liabilities|in:credit,debit', 'liability_direction' => 'nullable|required_if:type,liability|required_if:type,liabilities|in:credit,debit',
'interest' => 'between:0,100|numeric', 'interest' => 'between:0,100|numeric',

View File

@@ -33,7 +33,6 @@ use FireflyIII\Support\Request\AppendsLocationData;
use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log;
/** /**
* Class UpdateRequest * Class UpdateRequest
@@ -63,9 +62,9 @@ class UpdateRequest extends FormRequest
'account_role' => ['account_role', 'convertString'], 'account_role' => ['account_role', 'convertString'],
'liability_type' => ['liability_type', 'convertString'], 'liability_type' => ['liability_type', 'convertString'],
'opening_balance' => ['opening_balance', 'convertString'], 'opening_balance' => ['opening_balance', 'convertString'],
'opening_balance_date' => ['opening_balance_date', 'date'], 'opening_balance_date' => ['opening_balance_date', 'convertDateTime'],
'cc_type' => ['credit_card_type', 'convertString'], 'cc_type' => ['credit_card_type', 'convertString'],
'cc_monthly_payment_date' => ['monthly_payment_date', 'convertString'], 'cc_monthly_payment_date' => ['monthly_payment_date', 'convertDateTime'],
'notes' => ['notes', 'stringWithNewlines'], 'notes' => ['notes', 'stringWithNewlines'],
'interest' => ['interest', 'convertString'], 'interest' => ['interest', 'convertString'],
'interest_period' => ['interest_period', 'convertString'], 'interest_period' => ['interest_period', 'convertString'],
@@ -77,6 +76,7 @@ class UpdateRequest extends FormRequest
'liability_start_date' => ['liability_start_date', 'date'], 'liability_start_date' => ['liability_start_date', 'date'],
]; ];
$data = $this->getAllData($fields); $data = $this->getAllData($fields);
return $this->appendLocationData($data, null); return $this->appendLocationData($data, null);
} }
@@ -94,7 +94,7 @@ class UpdateRequest extends FormRequest
$ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes'))); $ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes')));
$rules = [ $rules = [
'name' => sprintf('min:1|uniqueAccountForUser:%d', $account->id), 'name' => sprintf('min:1|max:1024|uniqueAccountForUser:%d', $account->id),
'type' => sprintf('in:%s', $types), 'type' => sprintf('in:%s', $types),
'iban' => ['iban', 'nullable', new UniqueIban($account, $this->convertString('type'))], 'iban' => ['iban', 'nullable', new UniqueIban($account, $this->convertString('type'))],
'bic' => 'bic|nullable', 'bic' => 'bic|nullable',
@@ -104,7 +104,7 @@ class UpdateRequest extends FormRequest
'virtual_balance' => 'numeric|nullable', 'virtual_balance' => 'numeric|nullable',
'order' => 'numeric|nullable', 'order' => 'numeric|nullable',
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
'active' => [new IsBoolean()], 'active' => [new IsBoolean()],
'include_net_worth' => [new IsBoolean()], 'include_net_worth' => [new IsBoolean()],
'account_role' => sprintf('in:%s|nullable|required_if:type,asset', $accountRoles), 'account_role' => sprintf('in:%s|nullable|required_if:type,asset', $accountRoles),

View File

@@ -67,7 +67,7 @@ class Request extends FormRequest
{ {
return [ return [
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
'amount' => 'numeric|gt:0', 'amount' => 'numeric|gt:0',
'start' => 'date', 'start' => 'date',
'end' => 'date', 'end' => 'date',

View File

@@ -28,8 +28,8 @@ use FireflyIII\Rules\IsBoolean;
use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Validator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Validator;
/** /**
* Class StoreRequest * Class StoreRequest
@@ -82,7 +82,7 @@ class StoreRequest extends FormRequest
'amount_min' => 'numeric|gt:0|required', 'amount_min' => 'numeric|gt:0|required',
'amount_max' => 'numeric|gt:0|required', 'amount_max' => 'numeric|gt:0|required',
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
'date' => 'date|required', 'date' => 'date|required',
'end_date' => 'date|after:date', 'end_date' => 'date|after:date',
'extension_date' => 'date|after:date', 'extension_date' => 'date|after:date',
@@ -105,8 +105,8 @@ class StoreRequest extends FormRequest
$validator->after( $validator->after(
static function (Validator $validator) { static function (Validator $validator) {
$data = $validator->getData(); $data = $validator->getData();
$min = $data['amount_min'] ?? '0'; $min = (string)($data['amount_min'] ?? '0');
$max = $data['amount_max'] ?? '0'; $max = (string)($data['amount_max'] ?? '0');
if (1 === bccomp($min, $max)) { if (1 === bccomp($min, $max)) {
$validator->errors()->add('amount_min', (string)trans('validation.amount_min_over_max')); $validator->errors()->add('amount_min', (string)trans('validation.amount_min_over_max'));

View File

@@ -84,7 +84,7 @@ class UpdateRequest extends FormRequest
'amount_min' => 'numeric|gt:0', 'amount_min' => 'numeric|gt:0',
'amount_max' => 'numeric|gt:0', 'amount_max' => 'numeric|gt:0',
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
'date' => 'date', 'date' => 'date',
'end_date' => 'date|after:date', 'end_date' => 'date|after:date',
'extension_date' => 'date|after:date', 'extension_date' => 'date|after:date',

View File

@@ -79,9 +79,9 @@ class StoreRequest extends FormRequest
'currency_code' => 'exists:transaction_currencies,code', 'currency_code' => 'exists:transaction_currencies,code',
'notes' => 'nullable|between:1,65536', 'notes' => 'nullable|between:1,65536',
// auto budget info // auto budget info
'auto_budget_type' => 'in:reset,rollover,none', 'auto_budget_type' => 'in:reset,rollover,adjusted,none',
'auto_budget_amount' => 'numeric|min:0|max:1000000000|required_if:auto_budget_type,reset|required_if:auto_budget_type,rollover', 'auto_budget_amount' => 'numeric|min:0|max:1000000000|required_if:auto_budget_type,reset|required_if:auto_budget_type,rollover|required_if:auto_budget_type,adjusted',
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly|required_if:auto_budget_type,reset|required_if:auto_budget_type,rollover', 'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly|required_if:auto_budget_type,reset|required_if:auto_budget_type,rollover|required_if:auto_budget_type,adjusted',
]; ];
} }

View File

@@ -67,6 +67,7 @@ class UpdateRequest extends FormRequest
'none' => 0, 'none' => 0,
'reset' => 1, 'reset' => 1,
'rollover' => 2, 'rollover' => 2,
'adjusted' => 3,
]; ];
$allData['auto_budget_type'] = $types[$allData['auto_budget_type']] ?? 0; $allData['auto_budget_type'] = $types[$allData['auto_budget_type']] ?? 0;
} }
@@ -88,7 +89,7 @@ class UpdateRequest extends FormRequest
'name' => sprintf('between:1,100|uniqueObjectForUser:budgets,name,%d', $budget->id), 'name' => sprintf('between:1,100|uniqueObjectForUser:budgets,name,%d', $budget->id),
'active' => [new IsBoolean()], 'active' => [new IsBoolean()],
'notes' => 'nullable|between:1,65536', 'notes' => 'nullable|between:1,65536',
'auto_budget_type' => 'in:reset,rollover,none', 'auto_budget_type' => 'in:reset,rollover,adjusted,none',
'auto_budget_currency_id' => 'exists:transaction_currencies,id', 'auto_budget_currency_id' => 'exists:transaction_currencies,id',
'auto_budget_currency_code' => 'exists:transaction_currencies,code', 'auto_budget_currency_code' => 'exists:transaction_currencies,code',
'auto_budget_amount' => 'min:0|max:1000000000', 'auto_budget_amount' => 'min:0|max:1000000000',

View File

@@ -65,7 +65,7 @@ class StoreRequest extends FormRequest
'end' => 'required|after:start|date', 'end' => 'required|after:start|date',
'amount' => 'required|gt:0', 'amount' => 'required|gt:0',
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
]; ];
} }
} }

View File

@@ -69,7 +69,7 @@ class UpdateRequest extends FormRequest
'end' => 'date', 'end' => 'date',
'amount' => 'gt:0', 'amount' => 'gt:0',
'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
]; ];
} }

View File

@@ -63,7 +63,7 @@ class UpdateRequest extends FormRequest
$objectGroup = $this->route()->parameter('objectGroup'); $objectGroup = $this->route()->parameter('objectGroup');
return [ return [
'title' => sprintf('min:1|uniqueObjectGroup:%d', $objectGroup->id), 'title' => sprintf('max:1024|min:1|uniqueObjectGroup:%d', $objectGroup->id),
'order' => 'numeric', 'order' => 'numeric',
]; ];
} }

View File

@@ -52,8 +52,8 @@ class UpdateRequest extends FormRequest
'account_id' => ['account_id', 'convertInteger'], 'account_id' => ['account_id', 'convertInteger'],
'targetamount' => ['target_amount', 'convertString'], 'targetamount' => ['target_amount', 'convertString'],
'current_amount' => ['current_amount', 'convertString'], 'current_amount' => ['current_amount', 'convertString'],
'startdate' => ['start_date', 'date'], 'startdate' => ['start_date', 'convertDateTime'],
'targetdate' => ['target_date', 'convertString'], 'targetdate' => ['target_date', 'convertDateTime'],
'notes' => ['notes', 'stringWithNewlines'], 'notes' => ['notes', 'stringWithNewlines'],
'order' => ['order', 'convertInteger'], 'order' => ['order', 'convertInteger'],
'object_group_title' => ['object_group_title', 'convertString'], 'object_group_title' => ['object_group_title', 'convertString'],

View File

@@ -57,8 +57,8 @@ class StoreRequest extends FormRequest
'type' => ['type', 'convertString'], 'type' => ['type', 'convertString'],
'title' => ['title', 'convertString'], 'title' => ['title', 'convertString'],
'description' => ['description', 'convertString'], 'description' => ['description', 'convertString'],
'first_date' => ['first_date', 'date'], 'first_date' => ['first_date', 'convertDateTime'],
'repeat_until' => ['repeat_until', 'date'], 'repeat_until' => ['repeat_until', 'convertDateTime'],
'nr_of_repetitions' => ['nr_of_repetitions', 'convertInteger'], 'nr_of_repetitions' => ['nr_of_repetitions', 'convertInteger'],
'apply_rules' => ['apply_rules', 'boolean'], 'apply_rules' => ['apply_rules', 'boolean'],
'active' => ['active', 'boolean'], 'active' => ['active', 'boolean'],
@@ -158,9 +158,9 @@ class StoreRequest extends FormRequest
'transactions.*.amount' => 'required|numeric|gt:0', 'transactions.*.amount' => 'required|numeric|gt:0',
'transactions.*.foreign_amount' => 'nullable|numeric|gt:0', 'transactions.*.foreign_amount' => 'nullable|numeric|gt:0',
'transactions.*.currency_id' => 'nullable|numeric|exists:transaction_currencies,id', 'transactions.*.currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.currency_code' => 'nullable|min:3|max:3|exists:transaction_currencies,code', 'transactions.*.currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id', 'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.foreign_currency_code' => 'nullable|min:3|max:3|exists:transaction_currencies,code', 'transactions.*.foreign_currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
'transactions.*.source_id' => ['numeric', 'nullable', new BelongsUser()], 'transactions.*.source_id' => ['numeric', 'nullable', new BelongsUser()],
'transactions.*.source_name' => 'between:1,255|nullable', 'transactions.*.source_name' => 'between:1,255|nullable',
'transactions.*.destination_id' => ['numeric', 'nullable', new BelongsUser()], 'transactions.*.destination_id' => ['numeric', 'nullable', new BelongsUser()],

View File

@@ -58,8 +58,8 @@ class UpdateRequest extends FormRequest
$fields = [ $fields = [
'title' => ['title', 'convertString'], 'title' => ['title', 'convertString'],
'description' => ['description', 'convertString'], 'description' => ['description', 'convertString'],
'first_date' => ['first_date', 'date'], 'first_date' => ['first_date', 'convertDateTime'],
'repeat_until' => ['repeat_until', 'date'], 'repeat_until' => ['repeat_until', 'convertDateTime'],
'nr_of_repetitions' => ['nr_of_repetitions', 'convertInteger'], 'nr_of_repetitions' => ['nr_of_repetitions', 'convertInteger'],
'apply_rules' => ['apply_rules', 'boolean'], 'apply_rules' => ['apply_rules', 'boolean'],
'active' => ['active', 'boolean'], 'active' => ['active', 'boolean'],
@@ -172,9 +172,9 @@ class UpdateRequest extends FormRequest
'transactions.*.amount' => 'numeric|gt:0', 'transactions.*.amount' => 'numeric|gt:0',
'transactions.*.foreign_amount' => 'nullable|numeric|gt:0', 'transactions.*.foreign_amount' => 'nullable|numeric|gt:0',
'transactions.*.currency_id' => 'nullable|numeric|exists:transaction_currencies,id', 'transactions.*.currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.currency_code' => 'nullable|min:3|max:3|exists:transaction_currencies,code', 'transactions.*.currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id', 'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.foreign_currency_code' => 'nullable|min:3|max:3|exists:transaction_currencies,code', 'transactions.*.foreign_currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
'transactions.*.source_id' => ['numeric', 'nullable', new BelongsUser()], 'transactions.*.source_id' => ['numeric', 'nullable', new BelongsUser()],
'transactions.*.source_name' => 'between:1,255|nullable', 'transactions.*.source_name' => 'between:1,255|nullable',
'transactions.*.destination_id' => ['numeric', 'nullable', new BelongsUser()], 'transactions.*.destination_id' => ['numeric', 'nullable', new BelongsUser()],
@@ -205,6 +205,11 @@ class UpdateRequest extends FormRequest
function (Validator $validator) { function (Validator $validator) {
//$this->validateOneRecurrenceTransaction($validator); //$this->validateOneRecurrenceTransaction($validator);
//$this->validateOneRepetitionUpdate($validator); //$this->validateOneRepetitionUpdate($validator);
/** @var Recurrence $recurrence */
$recurrence = $this->route()->parameter('recurrence');
$this->validateTransactionId($recurrence, $validator);
$this->validateRecurrenceRepetition($validator); $this->validateRecurrenceRepetition($validator);
$this->validateRepetitionMoment($validator); $this->validateRepetitionMoment($validator);
$this->validateForeignCurrencyInformation($validator); $this->validateForeignCurrencyInformation($validator);
@@ -212,4 +217,5 @@ class UpdateRequest extends FormRequest
} }
); );
} }
} }

View File

@@ -79,7 +79,7 @@ class StoreRequest extends FormRequest
$return[] = [ $return[] = [
'type' => $trigger['type'], 'type' => $trigger['type'],
'value' => $trigger['value'], 'value' => $trigger['value'],
'active' => $this->convertBoolean((string)($trigger['active'] ?? 'false')), 'active' => $this->convertBoolean((string)($trigger['active'] ?? 'true')),
'stop_processing' => $this->convertBoolean((string)($trigger['stop_processing'] ?? 'false')), 'stop_processing' => $this->convertBoolean((string)($trigger['stop_processing'] ?? 'false')),
]; ];
} }
@@ -100,7 +100,7 @@ class StoreRequest extends FormRequest
$return[] = [ $return[] = [
'type' => $action['type'], 'type' => $action['type'],
'value' => $action['value'], 'value' => $action['value'],
'active' => $this->convertBoolean((string)($action['active'] ?? 'false')), 'active' => $this->convertBoolean((string)($action['active'] ?? 'true')),
'stop_processing' => $this->convertBoolean((string)($action['stop_processing'] ?? 'false')), 'stop_processing' => $this->convertBoolean((string)($action['stop_processing'] ?? 'false')),
]; ];
} }
@@ -130,7 +130,7 @@ class StoreRequest extends FormRequest
'rule_group_title' => 'nullable|between:1,255|required_without:rule_group_id|belongsToUser:rule_groups,title', 'rule_group_title' => 'nullable|between:1,255|required_without:rule_group_id|belongsToUser:rule_groups,title',
'trigger' => 'required|in:store-journal,update-journal', 'trigger' => 'required|in:store-journal,update-journal',
'triggers.*.type' => 'required|in:' . implode(',', $validTriggers), 'triggers.*.type' => 'required|in:' . implode(',', $validTriggers),
'triggers.*.value' => 'required_if:actions.*.type,'.$contextTriggers.'|min:1|ruleTriggerValue', 'triggers.*.value' => 'required_if:actions.*.type,' . $contextTriggers . '|min:1|ruleTriggerValue|max:1024',
'triggers.*.stop_processing' => [new IsBoolean()], 'triggers.*.stop_processing' => [new IsBoolean()],
'triggers.*.active' => [new IsBoolean()], 'triggers.*.active' => [new IsBoolean()],
'actions.*.type' => 'required|in:' . implode(',', $validActions), 'actions.*.type' => 'required|in:' . implode(',', $validActions),

View File

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

View File

@@ -65,8 +65,8 @@ class StoreRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
$rules = [ $rules = [
'tag' => 'required|min:1|uniqueObjectForUser:tags,tag', 'tag' => 'required|min:1|uniqueObjectForUser:tags,tag|max:1024',
'description' => 'min:1|nullable', 'description' => 'min:1|nullable|max:65536',
'date' => 'date|nullable', 'date' => 'date|nullable',
]; ];

View File

@@ -71,8 +71,8 @@ class UpdateRequest extends FormRequest
$tag = $this->route()->parameter('tagOrId'); $tag = $this->route()->parameter('tagOrId');
// TODO check if uniqueObjectForUser is obsolete // TODO check if uniqueObjectForUser is obsolete
$rules = [ $rules = [
'tag' => 'min:1|uniqueObjectForUser:tags,tag,'.$tag->id, 'tag' => 'min:1|max:1024|uniqueObjectForUser:tags,tag,' . $tag->id,
'description' => 'min:1|nullable', 'description' => 'min:1|nullable|max:65536',
'date' => 'date|nullable', 'date' => 'date|nullable',
]; ];

View File

@@ -35,8 +35,8 @@ use FireflyIII\Validation\CurrencyValidation;
use FireflyIII\Validation\GroupValidation; use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation; use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Validator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Validator;
/** /**
* Class StoreRequest * Class StoreRequest
@@ -188,9 +188,9 @@ class StoreRequest extends FormRequest
// currency info // currency info
'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable', 'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable',
'transactions.*.currency_code' => 'min:3|max:3|exists:transaction_currencies,code|nullable', 'transactions.*.currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
'transactions.*.foreign_currency_id' => 'numeric|exists:transaction_currencies,id|nullable', 'transactions.*.foreign_currency_id' => 'numeric|exists:transaction_currencies,id|nullable',
'transactions.*.foreign_currency_code' => 'min:3|max:3|exists:transaction_currencies,code|nullable', 'transactions.*.foreign_currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
// amount // amount
'transactions.*.amount' => 'required|numeric|gt:0', 'transactions.*.amount' => 'required|numeric|gt:0',
@@ -225,25 +225,25 @@ class StoreRequest extends FormRequest
// other interesting fields // other interesting fields
'transactions.*.reconciled' => [new IsBoolean()], 'transactions.*.reconciled' => [new IsBoolean()],
'transactions.*.notes' => 'min:1,max:50000|nullable', 'transactions.*.notes' => 'min:1|max:50000|nullable',
'transactions.*.tags' => 'between:0,255', 'transactions.*.tags' => 'between:0,255',
// meta info fields // meta info fields
'transactions.*.internal_reference' => 'min:1,max:255|nullable', 'transactions.*.internal_reference' => 'min:1|max:255|nullable',
'transactions.*.external_id' => 'min:1,max:255|nullable', 'transactions.*.external_id' => 'min:1|max:255|nullable',
'transactions.*.recurrence_id' => 'min:1,max:255|nullable', 'transactions.*.recurrence_id' => 'min:1|max:255|nullable',
'transactions.*.bunq_payment_id' => 'min:1,max:255|nullable', 'transactions.*.bunq_payment_id' => 'min:1|max:255|nullable',
'transactions.*.external_url' => 'min:1,max:255|nullable|url', 'transactions.*.external_url' => 'min:1|max:255|nullable|url',
// SEPA fields: // SEPA fields:
'transactions.*.sepa_cc' => 'min:1,max:255|nullable', 'transactions.*.sepa_cc' => 'min:1|max:255|nullable',
'transactions.*.sepa_ct_op' => 'min:1,max:255|nullable', 'transactions.*.sepa_ct_op' => 'min:1|max:255|nullable',
'transactions.*.sepa_ct_id' => 'min:1,max:255|nullable', 'transactions.*.sepa_ct_id' => 'min:1|max:255|nullable',
'transactions.*.sepa_db' => 'min:1,max:255|nullable', 'transactions.*.sepa_db' => 'min:1|max:255|nullable',
'transactions.*.sepa_country' => 'min:1,max:255|nullable', 'transactions.*.sepa_country' => 'min:1|max:255|nullable',
'transactions.*.sepa_ep' => 'min:1,max:255|nullable', 'transactions.*.sepa_ep' => 'min:1|max:255|nullable',
'transactions.*.sepa_ci' => 'min:1,max:255|nullable', 'transactions.*.sepa_ci' => 'min:1|max:255|nullable',
'transactions.*.sepa_batch_id' => 'min:1,max:255|nullable', 'transactions.*.sepa_batch_id' => 'min:1|max:255|nullable',
// dates // dates
'transactions.*.interest_date' => 'date|nullable', 'transactions.*.interest_date' => 'date|nullable',
@@ -270,7 +270,9 @@ class StoreRequest extends FormRequest
$this->validateTransactionArray($validator); $this->validateTransactionArray($validator);
// must submit at least one transaction. // must submit at least one transaction.
Log::debug('Now going to validateOneTransaction');
$this->validateOneTransaction($validator); $this->validateOneTransaction($validator);
Log::debug('Now done with validateOneTransaction');
// all journals must have a description // all journals must have a description
$this->validateDescriptions($validator); $this->validateDescriptions($validator);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\Models\Transaction; namespace FireflyIII\Api\V1\Requests\Models\Transaction;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionGroup;
use FireflyIII\Rules\BelongsUser; use FireflyIII\Rules\BelongsUser;
use FireflyIII\Rules\IsBoolean; use FireflyIII\Rules\IsBoolean;
@@ -58,6 +59,7 @@ class UpdateRequest extends FormRequest
* Get all data. Is pretty complex because of all the ??-statements. * Get all data. Is pretty complex because of all the ??-statements.
* *
* @return array * @return array
* @throws FireflyException
*/ */
public function getAll(): array public function getAll(): array
{ {
@@ -151,6 +153,7 @@ class UpdateRequest extends FormRequest
* Get transaction data. * Get transaction data.
* *
* @return array * @return array
* @throws FireflyException
*/ */
private function getTransactionData(): array private function getTransactionData(): array
{ {
@@ -163,6 +166,9 @@ class UpdateRequest extends FormRequest
/** @var array $transaction */ /** @var array $transaction */
foreach ($this->get('transactions') as $transaction) { foreach ($this->get('transactions') as $transaction) {
if (!is_array($transaction)) {
throw new FireflyException('Invalid data submitted: transaction is not array.');
}
// default response is to update nothing in the transaction: // default response is to update nothing in the transaction:
$current = []; $current = [];
$current = $this->getIntegerData($current, $transaction); $current = $this->getIntegerData($current, $transaction);
@@ -287,6 +293,7 @@ class UpdateRequest extends FormRequest
/** /**
* @param array $current * @param array $current
* @param array $transaction * @param array $transaction
*
* @return array * @return array
*/ */
private function getFloatData(array $current, array $transaction): array private function getFloatData(array $current, array $transaction): array
@@ -295,7 +302,7 @@ class UpdateRequest extends FormRequest
if (array_key_exists($fieldName, $transaction)) { if (array_key_exists($fieldName, $transaction)) {
$value = $transaction[$fieldName]; $value = $transaction[$fieldName];
if (is_float($value)) { if (is_float($value)) {
$current[$fieldName] = sprintf('%.24f', $value); $current[$fieldName] = sprintf('%.12f', $value);
} }
if (!is_float($value)) { if (!is_float($value)) {
$current[$fieldName] = (string)$value; $current[$fieldName] = (string)$value;
@@ -314,9 +321,10 @@ 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__));
return [ return [
// basic fields for group: // basic fields for group:
'group_title' => 'between:1,1000', 'group_title' => 'between:1,1000|nullable',
'apply_rules' => [new IsBoolean()], 'apply_rules' => [new IsBoolean()],
// transaction rules (in array for splits): // transaction rules (in array for splits):
@@ -329,10 +337,10 @@ class UpdateRequest extends FormRequest
// currency info // currency info
'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id', 'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable',
'transactions.*.currency_code' => 'min:3|max:3|exists:transaction_currencies,code', 'transactions.*.currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id', 'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.foreign_currency_code' => 'nullable|min:3|max:3|exists:transaction_currencies,code', 'transactions.*.foreign_currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
// amount // amount
'transactions.*.amount' => 'numeric|gt:0|max:100000000000', 'transactions.*.amount' => 'numeric|gt:0|max:100000000000',
@@ -350,34 +358,34 @@ class UpdateRequest extends FormRequest
'transactions.*.destination_name' => 'between:1,255|nullable', 'transactions.*.destination_name' => 'between:1,255|nullable',
// budget, category, bill and piggy // budget, category, bill and piggy
'transactions.*.budget_id' => ['mustExist:budgets,id', new BelongsUser()], 'transactions.*.budget_id' => ['mustExist:budgets,id', new BelongsUser(), 'nullable'],
'transactions.*.budget_name' => ['between:1,255', 'nullable', new BelongsUser()], 'transactions.*.budget_name' => ['between:1,255', 'nullable', new BelongsUser()],
'transactions.*.category_id' => ['mustExist:categories,id', new BelongsUser()], 'transactions.*.category_id' => ['mustExist:categories,id', new BelongsUser(), 'nullable'],
'transactions.*.category_name' => 'between:1,255|nullable', 'transactions.*.category_name' => 'between:1,255|nullable',
'transactions.*.bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser()], 'transactions.*.bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser()],
'transactions.*.bill_name' => ['between:1,255', 'nullable', new BelongsUser()], 'transactions.*.bill_name' => ['between:1,255', 'nullable', new BelongsUser()],
// other interesting fields // other interesting fields
'transactions.*.reconciled' => [new IsBoolean()], 'transactions.*.reconciled' => [new IsBoolean()],
'transactions.*.notes' => 'min:1,max:50000|nullable', 'transactions.*.notes' => 'min:1|max:50000|nullable',
'transactions.*.tags' => 'between:0,255', 'transactions.*.tags' => 'between:0,255|nullable',
// meta info fields // meta info fields
'transactions.*.internal_reference' => 'min:1,max:255|nullable', 'transactions.*.internal_reference' => 'min:1|max:255|nullable',
'transactions.*.external_id' => 'min:1,max:255|nullable', 'transactions.*.external_id' => 'min:1|max:255|nullable',
'transactions.*.recurrence_id' => 'min:1,max:255|nullable', 'transactions.*.recurrence_id' => 'min:1|max:255|nullable',
'transactions.*.bunq_payment_id' => 'min:1,max:255|nullable', 'transactions.*.bunq_payment_id' => 'min:1|max:255|nullable',
'transactions.*.external_url' => 'min:1,max:255|nullable|url', 'transactions.*.external_url' => 'min:1|max:255|nullable|url',
// SEPA fields: // SEPA fields:
'transactions.*.sepa_cc' => 'min:1,max:255|nullable', 'transactions.*.sepa_cc' => 'min:1|max:255|nullable',
'transactions.*.sepa_ct_op' => 'min:1,max:255|nullable', 'transactions.*.sepa_ct_op' => 'min:1|max:255|nullable',
'transactions.*.sepa_ct_id' => 'min:1,max:255|nullable', 'transactions.*.sepa_ct_id' => 'min:1|max:255|nullable',
'transactions.*.sepa_db' => 'min:1,max:255|nullable', 'transactions.*.sepa_db' => 'min:1|max:255|nullable',
'transactions.*.sepa_country' => 'min:1,max:255|nullable', 'transactions.*.sepa_country' => 'min:1|max:255|nullable',
'transactions.*.sepa_ep' => 'min:1,max:255|nullable', 'transactions.*.sepa_ep' => 'min:1|max:255|nullable',
'transactions.*.sepa_ci' => 'min:1,max:255|nullable', 'transactions.*.sepa_ci' => 'min:1|max:255|nullable',
'transactions.*.sepa_batch_id' => 'min:1,max:255|nullable', 'transactions.*.sepa_batch_id' => 'min:1|max:255|nullable',
// dates // dates
'transactions.*.interest_date' => 'date|nullable', 'transactions.*.interest_date' => 'date|nullable',
@@ -398,6 +406,7 @@ class UpdateRequest extends FormRequest
*/ */
public function withValidator(Validator $validator): void public function withValidator(Validator $validator): void
{ {
Log::debug('Now in withValidator');
/** @var TransactionGroup $transactionGroup */ /** @var TransactionGroup $transactionGroup */
$transactionGroup = $this->route()->parameter('transactionGroup'); $transactionGroup = $this->route()->parameter('transactionGroup');
$validator->after( $validator->after(

View File

@@ -75,7 +75,7 @@ class StoreRequest extends FormRequest
'name' => 'required|between:1,255|unique:transaction_currencies,name', 'name' => 'required|between:1,255|unique:transaction_currencies,name',
'code' => 'required|between:3,51|unique:transaction_currencies,code', 'code' => 'required|between:3,51|unique:transaction_currencies,code',
'symbol' => 'required|between:1,51|unique:transaction_currencies,symbol', 'symbol' => 'required|between:1,51|unique:transaction_currencies,symbol',
'decimal_places' => 'between:0,20|numeric|min:0|max:20', 'decimal_places' => 'between:0,20|numeric|min:0|max:12',
'enabled' => [new IsBoolean()], 'enabled' => [new IsBoolean()],
'default' => [new IsBoolean()], 'default' => [new IsBoolean()],

View File

@@ -74,7 +74,7 @@ class UpdateRequest extends FormRequest
'name' => sprintf('between:1,255|unique:transaction_currencies,name,%d', $currency->id), 'name' => sprintf('between:1,255|unique:transaction_currencies,name,%d', $currency->id),
'code' => sprintf('between:3,51|unique:transaction_currencies,code,%d', $currency->id), 'code' => sprintf('between:3,51|unique:transaction_currencies,code,%d', $currency->id),
'symbol' => sprintf('between:1,51|unique:transaction_currencies,symbol,%d', $currency->id), 'symbol' => sprintf('between:1,51|unique:transaction_currencies,symbol,%d', $currency->id),
'decimal_places' => 'between:0,20|numeric|min:0|max:20', 'decimal_places' => 'between:0,20|numeric|min:0|max:12',
'enabled' => [new IsBoolean()], 'enabled' => [new IsBoolean()],
'default' => [new IsBoolean()], 'default' => [new IsBoolean()],
]; ];

View File

@@ -59,9 +59,9 @@ class StoreRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
return [ return [
'name' => 'required|unique:link_types,name|min:1', 'name' => 'required|unique:link_types,name|min:1|max:1024',
'outward' => 'required|unique:link_types,outward|min:1|different:inward', 'outward' => 'required|unique:link_types,outward|min:1|different:inward|max:1024',
'inward' => 'required|unique:link_types,inward|min:1|different:outward', 'inward' => 'required|unique:link_types,inward|min:1|different:outward|max:1024',
]; ];
} }
} }

View File

@@ -64,9 +64,9 @@ class UpdateRequest extends FormRequest
$linkType = $this->route()->parameter('linkType'); $linkType = $this->route()->parameter('linkType');
return [ return [
'name' => [Rule::unique('link_types', 'name')->ignore($linkType->id), 'min:1'], 'name' => [Rule::unique('link_types', 'name')->ignore($linkType->id), 'min:1', 'max:1024'],
'outward' => ['different:inward', Rule::unique('link_types', 'outward')->ignore($linkType->id), 'min:1'], 'outward' => ['different:inward', Rule::unique('link_types', 'outward')->ignore($linkType->id), 'min:1', 'max:1024'],
'inward' => ['different:outward', Rule::unique('link_types', 'inward')->ignore($linkType->id), 'min:1'], 'inward' => ['different:outward', Rule::unique('link_types', 'inward')->ignore($linkType->id), 'min:1', 'max:1024'],
]; ];
} }
} }

View File

@@ -27,6 +27,9 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/**
* Class PreferenceStoreRequest
*/
class PreferenceStoreRequest extends FormRequest class PreferenceStoreRequest extends FormRequest
{ {
use ChecksLogin; use ChecksLogin;

View File

@@ -28,6 +28,9 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/**
* Class PreferenceUpdateRequest
*/
class PreferenceUpdateRequest extends FormRequest class PreferenceUpdateRequest extends FormRequest
{ {
use ChecksLogin; use ChecksLogin;

View File

@@ -29,10 +29,9 @@ use FireflyIII\Api\V2\Request\Autocomplete\AutocompleteRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Administration\Account\AccountRepositoryInterface as AdminAccountRepositoryInterface;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Administration\Account\AccountRepositoryInterface as AdminAccountRepositoryInterface;
use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use JsonException; use JsonException;
@@ -43,8 +42,8 @@ class AccountController extends Controller
{ {
use AccountFilter; use AccountFilter;
private array $balanceTypes;
private AdminAccountRepositoryInterface $adminRepository; private AdminAccountRepositoryInterface $adminRepository;
private array $balanceTypes;
private AccountRepositoryInterface $repository; private AccountRepositoryInterface $repository;
/** /**
@@ -55,8 +54,6 @@ class AccountController extends Controller
parent::__construct(); parent::__construct();
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
/** @var User $user */
$user = auth()->user();
$this->repository = app(AccountRepositoryInterface::class); $this->repository = app(AccountRepositoryInterface::class);
$this->adminRepository = app(AdminAccountRepositoryInterface::class); $this->adminRepository = app(AdminAccountRepositoryInterface::class);
@@ -113,10 +110,10 @@ class AccountController extends Controller
} }
// custom order. // custom order.
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
usort( usort(
$return, $return,
function ($a, $b) use ($order) { function ($a, $b) {
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
$pos_a = array_search($a['type'], $order, true); $pos_a = array_search($a['type'], $order, true);
$pos_b = array_search($b['type'], $order, true); $pos_b = array_search($b['type'], $order, true);

View File

@@ -53,6 +53,7 @@ class AccountController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(AccountRepositoryInterface::class); $this->repository = app(AccountRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );
@@ -63,6 +64,7 @@ class AccountController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/charts/getChartAccountOverview * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/charts/getChartAccountOverview
* *
* @param DateRequest $request * @param DateRequest $request
*
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface

View File

@@ -136,6 +136,7 @@ class Controller extends BaseController
* @param string $key * @param string $key
* @param LengthAwarePaginator $paginator * @param LengthAwarePaginator $paginator
* @param AbstractTransformer $transformer * @param AbstractTransformer $transformer
*
* @return array * @return array
*/ */
final protected function jsonApiList(string $key, LengthAwarePaginator $paginator, AbstractTransformer $transformer): array final protected function jsonApiList(string $key, LengthAwarePaginator $paginator, AbstractTransformer $transformer): array
@@ -162,6 +163,7 @@ class Controller extends BaseController
* @param string $key * @param string $key
* @param Model $object * @param Model $object
* @param AbstractTransformer $transformer * @param AbstractTransformer $transformer
*
* @return array * @return array
*/ */
final protected function jsonApiObject(string $key, Model $object, AbstractTransformer $transformer): array final protected function jsonApiObject(string $key, Model $object, AbstractTransformer $transformer): array
@@ -174,6 +176,7 @@ class Controller extends BaseController
$transformer->collectMetaData(new Collection([$object])); $transformer->collectMetaData(new Collection([$object]));
$resource = new Item($object, $transformer, $key); $resource = new Item($object, $transformer, $key);
return $manager->createData($resource)->toArray(); return $manager->createData($resource)->toArray();
} }
} }

View File

@@ -48,6 +48,7 @@ class SumController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(BillRepositoryInterface::class); $this->repository = app(BillRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );
@@ -58,6 +59,7 @@ class SumController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/transactions-sum/getBillsPaidTrSum * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/transactions-sum/getBillsPaidTrSum
* *
* @param DateRequest $request * @param DateRequest $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function paid(DateRequest $request): JsonResponse public function paid(DateRequest $request): JsonResponse
@@ -75,6 +77,7 @@ class SumController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/transactions-sum/getBillsUnpaidTrSum * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/transactions-sum/getBillsUnpaidTrSum
* *
* @param DateRequest $request * @param DateRequest $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function unpaid(DateRequest $request): JsonResponse public function unpaid(DateRequest $request): JsonResponse

View File

@@ -31,6 +31,9 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
/**
* Class ListController
*/
class ListController extends Controller class ListController extends Controller
{ {
private BudgetRepositoryInterface $repository; private BudgetRepositoryInterface $repository;
@@ -41,6 +44,7 @@ class ListController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(BudgetRepositoryInterface::class); $this->repository = app(BudgetRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );
@@ -51,6 +55,7 @@ class ListController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/listBudgets * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/listBudgets
* *
* @param Request $request * @param Request $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function index(Request $request): JsonResponse public function index(Request $request): JsonResponse
@@ -61,6 +66,7 @@ class ListController extends Controller
$paginator = new LengthAwarePaginator($collection, $total, $this->pageSize, $this->parameters->get('page')); $paginator = new LengthAwarePaginator($collection, $total, $this->pageSize, $this->parameters->get('page'));
$transformer = new BudgetTransformer(); $transformer = new BudgetTransformer();
return response() return response()
->api($this->jsonApiList('budgets', $paginator, $transformer)) ->api($this->jsonApiList('budgets', $paginator, $transformer))
->header('Content-Type', self::CONTENT_TYPE); ->header('Content-Type', self::CONTENT_TYPE);

View File

@@ -1,6 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* ShowController.php * ShowController.php
* Copyright (c) 2023 james@firefly-iii.org * Copyright (c) 2023 james@firefly-iii.org
@@ -21,6 +21,8 @@ declare(strict_types=1);
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Api\V2\Controllers\Model\Budget; namespace FireflyIII\Api\V2\Controllers\Model\Budget;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
@@ -48,6 +50,7 @@ class ShowController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(BudgetRepositoryInterface::class); $this->repository = app(BudgetRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );

View File

@@ -48,6 +48,7 @@ class SumController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(BudgetRepositoryInterface::class); $this->repository = app(BudgetRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );
@@ -58,6 +59,7 @@ class SumController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/getBudgetedForBudget * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/getBudgetedForBudget
* *
* @param DateRequest $request * @param DateRequest $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function budgeted(DateRequest $request): JsonResponse public function budgeted(DateRequest $request): JsonResponse
@@ -72,7 +74,9 @@ class SumController extends Controller
/** /**
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/getSpentForBudget * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/getSpentForBudget
*
* @param DateRequest $request * @param DateRequest $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function spent(DateRequest $request): JsonResponse public function spent(DateRequest $request): JsonResponse

View File

@@ -32,6 +32,9 @@ use FireflyIII\Transformers\V2\BudgetLimitTransformer;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
/**
* Class ListController
*/
class ListController extends Controller class ListController extends Controller
{ {
private BudgetLimitRepositoryInterface $repository; private BudgetLimitRepositoryInterface $repository;
@@ -42,6 +45,7 @@ class ListController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(BudgetLimitRepositoryInterface::class); $this->repository = app(BudgetLimitRepositoryInterface::class);
return $next($request); return $next($request);
} }
); );
@@ -60,6 +64,7 @@ class ListController extends Controller
$paginator = new LengthAwarePaginator($collection, $total, $this->pageSize, $this->parameters->get('page')); $paginator = new LengthAwarePaginator($collection, $total, $this->pageSize, $this->parameters->get('page'));
$transformer = new BudgetLimitTransformer(); $transformer = new BudgetLimitTransformer();
return response() return response()
->api($this->jsonApiList('budget_limits', $paginator, $transformer)) ->api($this->jsonApiList('budget_limits', $paginator, $transformer))
->header('Content-Type', self::CONTENT_TYPE); ->header('Content-Type', self::CONTENT_TYPE);

View File

@@ -48,6 +48,7 @@ class NetWorthController extends Controller
function ($request, $next) { function ($request, $next) {
$this->netWorth = app(NetWorthInterface::class); $this->netWorth = app(NetWorthInterface::class);
$this->netWorth->setUser(auth()->user()); $this->netWorth->setUser(auth()->user());
return $next($request); return $next($request);
} }
); );
@@ -56,7 +57,9 @@ class NetWorthController extends Controller
/** /**
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/net-worth/getNetWorth * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/net-worth/getNetWorth
*
* @param SingleDateRequest $request * @param SingleDateRequest $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function get(SingleDateRequest $request): JsonResponse public function get(SingleDateRequest $request): JsonResponse

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Api\V2\Controllers\System; namespace FireflyIII\Api\V2\Controllers\System;
/**
* Class ConfigurationController
*/
class ConfigurationController class ConfigurationController
{ {
} }

View File

@@ -26,6 +26,9 @@ namespace FireflyIII\Api\V2\Controllers\System;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
/**
* Class DebugController
*/
class DebugController extends Controller class DebugController extends Controller
{ {
} }

View File

@@ -37,7 +37,9 @@ class PreferencesController extends Controller
/** /**
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/preferences/getPreference * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/preferences/getPreference
*
* @param Preference $preference * @param Preference $preference
*
* @return JsonResponse * @return JsonResponse
*/ */
public function get(Preference $preference): JsonResponse public function get(Preference $preference): JsonResponse

View File

@@ -46,6 +46,7 @@ class AccountController extends Controller
* *
* @param ListRequest $request * @param ListRequest $request
* @param Account $account * @param Account $account
*
* @return JsonResponse * @return JsonResponse
*/ */
public function listTransactions(ListRequest $request, Account $account): JsonResponse public function listTransactions(ListRequest $request, Account $account): JsonResponse

View File

@@ -60,6 +60,7 @@ class AutocompleteRequest extends FormRequest
$array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]); $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
/** @var User $user */ /** @var User $user */
$user = auth()->user(); $user = auth()->user();
return [ return [
'types' => $array, 'types' => $array,
'query' => $this->convertString('query'), 'query' => $this->convertString('query'),

View File

@@ -25,12 +25,14 @@ declare(strict_types=1);
namespace FireflyIII\Api\V2\Response\Sum; namespace FireflyIII\Api\V2\Response\Sum;
use Closure; use Closure;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
/** /**
* Class AutoSum * Class AutoSum
*
* @deprecated * @deprecated
*/ */
class AutoSum class AutoSum
@@ -39,7 +41,9 @@ class AutoSum
* @param Collection $objects * @param Collection $objects
* @param Closure $getCurrency * @param Closure $getCurrency
* @param Closure $getSum * @param Closure $getSum
*
* @return array * @return array
* @throws FireflyException
*/ */
public function autoSum(Collection $objects, Closure $getCurrency, Closure $getSum): array public function autoSum(Collection $objects, Closure $getCurrency, Closure $getSum): array
{ {
@@ -64,6 +68,6 @@ class AutoSum
} }
var_dump(array_values($return)); var_dump(array_values($return));
exit; throw new FireflyException('Not implemented');
} }
} }

View File

@@ -0,0 +1,264 @@
<?php
/*
* CorrectAmounts.php
* Copyright (c) 2023 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\AutoBudget;
use FireflyIII\Models\AvailableBudget;
use FireflyIII\Models\Bill;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankRepetition;
use FireflyIII\Models\RecurrenceTransaction;
use FireflyIII\Models\RuleTrigger;
use Illuminate\Console\Command;
/**
* Class ReportSkeleton
*/
class CorrectAmounts extends Command
{
use ShowsFriendlyMessages;
protected $description = 'This command makes sure positive and negative amounts are recorded correctly.';
protected $signature = 'firefly-iii:fix-amount-pos-neg';
/**
* @return int
*/
public function handle(): int
{
// auto budgets must be positive
$this->fixAutoBudgets();
// available budgets must be positive
$this->fixAvailableBudgets();
// bills must be positive (both amounts)
$this->fixBills();
// budget limits must be positive
$this->fixBudgetLimits();
// currency_exchange_rates must be positive
$this->fixExchangeRates();
// piggy_bank_repetitions must be positive
$this->fixRepetitions();
// piggy_banks must be positive
$this->fixPiggyBanks();
// recurrences_transactions amount must be positive
$this->fixRecurrences();
// rule_triggers must be positive or zero (amount_less, amount_more, amount_is)
$this->fixRuleTriggers();
return 0;
}
/**
* @return void
*/
private function fixAutoBudgets(): void
{
$set = AutoBudget::where('amount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All auto budget amounts are positive.');
return;
}
/** @var AutoBudget $item */
foreach ($set as $item) {
$item->amount = app('steam')->positive((string)$item->amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d auto budget amount(s).', $count));
}
/**
* @return void
*/
private function fixAvailableBudgets(): void
{
$set = AvailableBudget::where('amount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All available budget amounts are positive.');
return;
}
/** @var AvailableBudget $item */
foreach ($set as $item) {
$item->amount = app('steam')->positive((string)$item->amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d available budget amount(s).', $count));
}
/**
* @return void
*/
private function fixBills(): void
{
$set = Bill::where('amount_min', '<', 0)->orWhere('amount_max', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All bill amounts are positive.');
return;
}
/** @var Bill $item */
foreach ($set as $item) {
$item->amount_min = app('steam')->positive((string)$item->amount_min);
$item->amount_max = app('steam')->positive((string)$item->amount_max);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d bill amount(s).', $count));
}
/**
* @return void
*/
private function fixBudgetLimits(): void
{
$set = BudgetLimit::where('amount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All budget limit amounts are positive.');
return;
}
/** @var BudgetLimit $item */
foreach ($set as $item) {
$item->amount = app('steam')->positive((string)$item->amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d budget limit amount(s).', $count));
}
/**
* @return void
*/
private function fixExchangeRates(): void
{
$set = CurrencyExchangeRate::where('rate', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All currency exchange rates are positive.');
return;
}
/** @var BudgetLimit $item */
foreach ($set as $item) {
$item->rate = app('steam')->positive((string)$item->rate);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d currency exchange rate(s).', $count));
}
/**
* @return void
*/
private function fixRepetitions(): void
{
$set = PiggyBankRepetition::where('currentamount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All piggy bank repetition amounts are positive.');
return;
}
/** @var PiggyBankRepetition $item */
foreach ($set as $item) {
$item->currentamount = app('steam')->positive((string)$item->currentamount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d piggy bank repetition amount(s).', $count));
}
/**
* @return void
*/
private function fixPiggyBanks(): void
{
$set = PiggyBank::where('targetamount', '<', 0)->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All piggy bank amounts are positive.');
return;
}
/** @var PiggyBankRepetition $item */
foreach ($set as $item) {
$item->targetamount = app('steam')->positive((string)$item->targetamount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d piggy bank amount(s).', $count));
}
/**
* @return void
*/
private function fixRecurrences(): void
{
$set = RecurrenceTransaction::where('amount', '<', 0)
->orWhere('foreign_amount', '<', 0)
->get();
$count = $set->count();
if (0 === $count) {
$this->friendlyPositive('All recurring transaction amounts are positive.');
return;
}
/** @var PiggyBankRepetition $item */
foreach ($set as $item) {
$item->amount = app('steam')->positive((string)$item->amount);
$item->foreign_amount = app('steam')->positive((string)$item->foreign_amount);
$item->save();
}
$this->friendlyInfo(sprintf('Corrected %d recurring transaction amount(s).', $count));
}
/**
* @return void
*/
private function fixRuleTriggers(): void
{
$set = RuleTrigger::whereIn('trigger_type', ['amount_less', 'amount_more', 'amount_is'])->get();
$fixed = 0;
/** @var RuleTrigger $item */
foreach ($set as $item) {
// basic check:
if (-1 === bccomp((string)$item->trigger_value, '0')) {
$fixed++;
$item->trigger_value = app('steam')->positive((string)$item->trigger_value);
$item->save();
}
}
if (0 === $fixed) {
$this->friendlyPositive('All rule trigger amounts are positive.');
return;
}
$this->friendlyInfo(sprintf('Corrected %d rule trigger amount(s).', $fixed));
}
}

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use Artisan; use Artisan;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Schema; use Schema;
@@ -34,17 +35,9 @@ use Schema;
*/ */
class CorrectDatabase extends Command class CorrectDatabase extends Command
{ {
/** use ShowsFriendlyMessages;
* The console command description.
*
* @var string
*/
protected $description = 'Will correct the integrity of your database, if necessary.'; protected $description = 'Will correct the integrity of your database, if necessary.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly-iii:correct-database'; protected $signature = 'firefly-iii:correct-database';
/** /**
@@ -54,6 +47,8 @@ class CorrectDatabase extends Command
{ {
// if table does not exist, return false // if table does not exist, return false
if (!Schema::hasTable('users')) { if (!Schema::hasTable('users')) {
$this->friendlyError('No "users"-table, will not continue.');
return 1; return 1;
} }
$commands = [ $commands = [
@@ -61,7 +56,7 @@ class CorrectDatabase extends Command
'firefly-iii:create-link-types', 'firefly-iii:create-link-types',
'firefly-iii:create-access-tokens', 'firefly-iii:create-access-tokens',
'firefly-iii:remove-bills', 'firefly-iii:remove-bills',
'firefly-iii:fix-negative-limits', 'firefly-iii:fix-amount-pos-neg',
'firefly-iii:enable-currencies', 'firefly-iii:enable-currencies',
'firefly-iii:fix-transfer-budgets', 'firefly-iii:fix-transfer-budgets',
'firefly-iii:fix-uneven-amount', 'firefly-iii:fix-uneven-amount',
@@ -76,16 +71,16 @@ class CorrectDatabase extends Command
'firefly-iii:fix-ob-currencies', 'firefly-iii:fix-ob-currencies',
'firefly-iii:fix-long-descriptions', 'firefly-iii:fix-long-descriptions',
'firefly-iii:fix-recurring-transactions', 'firefly-iii:fix-recurring-transactions',
'firefly-iii:restore-oauth-keys',
'firefly-iii:upgrade-group-information', 'firefly-iii:upgrade-group-information',
'firefly-iii:fix-transaction-types', 'firefly-iii:fix-transaction-types',
'firefly-iii:fix-frontpage-accounts', 'firefly-iii:fix-frontpage-accounts',
// new!
'firefly-iii:unify-group-accounts',
'firefly-iii:trigger-credit-recalculation',
]; ];
foreach ($commands as $command) { foreach ($commands as $command) {
$this->line(sprintf('Now executing %s', $command)); $this->friendlyLine(sprintf('Now executing command "%s"', $command));
Artisan::call($command); $this->call($command);
$result = Artisan::output();
echo $result;
} }
return 0; return 0;

View File

@@ -24,7 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
@@ -33,25 +33,16 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType; use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use JsonException; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
/** /**
* Class CorrectOpeningBalanceCurrencies * Class CorrectOpeningBalanceCurrencies
*/ */
class CorrectOpeningBalanceCurrencies extends Command class CorrectOpeningBalanceCurrencies extends Command
{ {
/** use ShowsFriendlyMessages;
* The console command description.
*
* @var string
*/
protected $description = 'Will make sure that opening balance transaction currencies match the account they\'re for.'; protected $description = 'Will make sure that opening balance transaction currencies match the account they\'re for.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly-iii:fix-ob-currencies'; protected $signature = 'firefly-iii:fix-ob-currencies';
/** /**
@@ -61,57 +52,55 @@ class CorrectOpeningBalanceCurrencies extends Command
*/ */
public function handle(): int public function handle(): int
{ {
Log::debug(sprintf('Now in %s', __METHOD__)); $journals = $this->getJournals();
// get all OB journals:
$set = TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->whereNull('transaction_journals.deleted_at')
->where('transaction_types.type', TransactionType::OPENING_BALANCE)->get(['transaction_journals.*']);
$this->line(sprintf('Going to verify %d opening balance transactions.', $set->count()));
$count = 0; $count = 0;
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
foreach ($set as $journal) { foreach ($journals as $journal) {
$count += $this->correctJournal($journal); $count += $this->correctJournal($journal);
} }
if ($count > 0) { if ($count > 0) {
$message = sprintf('Corrected %d opening balance transaction(s).', $count); $message = sprintf('Corrected %d opening balance transaction(s).', $count);
Log::debug($message); $this->friendlyInfo($message);
$this->line($message);
} }
if (0 === $count) { if (0 === $count) {
$message = 'There was nothing to fix in the opening balance transactions.'; $message = 'There was nothing to fix in the opening balance transactions.';
Log::debug($message); $this->friendlyPositive($message);
$this->info($message);
} }
Log::debug(sprintf('Done with %s', __METHOD__));
return 0; return 0;
} }
/**
* @return Collection
*/
private function getJournals(): Collection
{
/** @var Collection */
return TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->whereNull('transaction_journals.deleted_at')
->where('transaction_types.type', TransactionType::OPENING_BALANCE)->get(['transaction_journals.*']);
}
/** /**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @return int * @return int
* @throws FireflyException
* @throws JsonException
*/ */
private function correctJournal(TransactionJournal $journal): int private function correctJournal(TransactionJournal $journal): int
{ {
// get the asset account for this opening balance: // get the asset account for this opening balance:
$account = $this->getAccount($journal); $account = $this->getAccount($journal);
if (null === $account) { if (null === $account) {
$message = sprintf('Transaction journal #%d has no valid account. Cant fix this line.', $journal->id); $message = sprintf('Transaction journal #%d has no valid account. Can\'t fix this line.', $journal->id);
app('log')->warning($message); app('log')->warning($message);
$this->warn($message); $this->friendlyError($message);
return 0; return 0;
} }
$currency = $this->getCurrency($account);
// update journal and all transactions: // update journal and all transactions:
return $this->setCurrency($journal, $currency); return $this->setCorrectCurrency($account, $journal);
} }
/** /**
@@ -130,33 +119,19 @@ class CorrectOpeningBalanceCurrencies extends Command
return $account; return $account;
} }
} }
return null; return null;
} }
/** /**
* @param Account $account * @param Account $account
*
* @return TransactionCurrency
* @throws JsonException
* @throws FireflyException
*/
private function getCurrency(Account $account): TransactionCurrency
{
/** @var AccountRepositoryInterface $repos */
$repos = app(AccountRepositoryInterface::class);
$repos->setUser($account->user);
return $repos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
}
/**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* @param TransactionCurrency $currency
* *
* @return int * @return int
*/ */
private function setCurrency(TransactionJournal $journal, TransactionCurrency $currency): int private function setCorrectCurrency(Account $account, TransactionJournal $journal): int
{ {
$currency = $this->getCurrency($account);
$count = 0; $count = 0;
if ((int)$journal->transaction_currency_id !== (int)$currency->id) { if ((int)$journal->transaction_currency_id !== (int)$currency->id) {
$journal->transaction_currency_id = $currency->id; $journal->transaction_currency_id = $currency->id;
@@ -175,4 +150,18 @@ class CorrectOpeningBalanceCurrencies extends Command
return $count; return $count;
} }
/**
* @param Account $account
*
* @return TransactionCurrency
*/
private function getCurrency(Account $account): TransactionCurrency
{
/** @var AccountRepositoryInterface $repos */
$repos = app(AccountRepositoryInterface::class);
$repos->setUser($account->user);
return $repos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
}
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use Exception; use Exception;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -33,6 +34,8 @@ use Illuminate\Console\Command;
*/ */
class CreateAccessTokens extends Command class CreateAccessTokens extends Command
{ {
use ShowsFriendlyMessages;
/** /**
* The console command description. * The console command description.
* *
@@ -58,7 +61,6 @@ class CreateAccessTokens extends Command
/** @var UserRepositoryInterface $repository */ /** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class); $repository = app(UserRepositoryInterface::class);
$start = microtime(true);
$count = 0; $count = 0;
$users = $repository->all(); $users = $repository->all();
/** @var User $user */ /** @var User $user */
@@ -67,15 +69,13 @@ class CreateAccessTokens extends Command
if (null === $pref) { if (null === $pref) {
$token = $user->generateAccessToken(); $token = $user->generateAccessToken();
app('preferences')->setForUser($user, 'access_token', $token); app('preferences')->setForUser($user, 'access_token', $token);
$this->line(sprintf('Generated access token for user %s', $user->email)); $this->friendlyInfo(sprintf('Generated access token for user %s', $user->email));
++$count; ++$count;
} }
} }
if (0 === $count) { if (0 === $count) {
$this->info('All access tokens OK!'); $this->friendlyPositive('Verified access tokens.');
} }
$end = round(microtime(true) - $start, 2);
$this->info(sprintf('Verify access tokens in %s seconds.', $end));
return 0; return 0;
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\LinkType; use FireflyIII\Models\LinkType;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -31,6 +32,8 @@ use Illuminate\Console\Command;
*/ */
class CreateLinkTypes extends Command class CreateLinkTypes extends Command
{ {
use ShowsFriendlyMessages;
/** /**
* The console command description. * The console command description.
* *
@@ -51,7 +54,6 @@ class CreateLinkTypes extends Command
*/ */
public function handle(): int public function handle(): int
{ {
$start = microtime(true);
$count = 0; $count = 0;
$set = [ $set = [
'Related' => ['relates to', 'relates to'], 'Related' => ['relates to', 'relates to'],
@@ -68,17 +70,14 @@ class CreateLinkTypes extends Command
$link->inward = $values[1]; $link->inward = $values[1];
$link->outward = $values[0]; $link->outward = $values[0];
++$count; ++$count;
$this->line(sprintf('Created missing link type "%s"', $name)); $this->friendlyInfo(sprintf('Created missing link type "%s"', $name));
} }
$link->editable = false; $link->editable = false;
$link->save(); $link->save();
} }
if (0 === $count) { if (0 === $count) {
$this->info('All link types OK!'); $this->friendlyPositive('All link types are OK');
} }
$end = round(microtime(true) - $start, 2);
$this->info(sprintf('Verified link types in %s seconds', $end));
return 0; return 0;
} }
} }

View File

@@ -24,26 +24,18 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use Exception; use Exception;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionGroup;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
/** /**
* Class DeleteEmptyGroups * Class DeleteEmptyGroups
*/ */
class DeleteEmptyGroups extends Command class DeleteEmptyGroups extends Command
{ {
/** use ShowsFriendlyMessages;
* The console command description.
*
* @var string
*/
protected $description = 'Delete empty transaction groups.'; protected $description = 'Delete empty transaction groups.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly-iii:delete-empty-groups'; protected $signature = 'firefly-iii:delete-empty-groups';
/** /**
@@ -55,16 +47,13 @@ class DeleteEmptyGroups extends Command
*/ */
public function handle(): int public function handle(): int
{ {
Log::debug(sprintf('Now in %s', __METHOD__));
$start = microtime(true);
$groupIds $groupIds
= TransactionGroup::leftJoin('transaction_journals', 'transaction_groups.id', '=', 'transaction_journals.transaction_group_id') = TransactionGroup::leftJoin('transaction_journals', 'transaction_groups.id', '=', 'transaction_journals.transaction_group_id')
->whereNull('transaction_journals.id')->get(['transaction_groups.id'])->pluck('id')->toArray(); ->whereNull('transaction_journals.id')->get(['transaction_groups.id'])->pluck('id')->toArray();
$total = count($groupIds); $total = count($groupIds);
Log::debug(sprintf('Count is %d', $total));
if ($total > 0) { if ($total > 0) {
$this->info(sprintf('Deleted %d empty transaction group(s).', $total)); $this->friendlyInfo(sprintf('Deleted %d empty transaction group(s).', $total));
// again, chunks for SQLite. // again, chunks for SQLite.
$chunks = array_chunk($groupIds, 500); $chunks = array_chunk($groupIds, 500);
@@ -72,8 +61,9 @@ class DeleteEmptyGroups extends Command
TransactionGroup::whereNull('deleted_at')->whereIn('id', $chunk)->delete(); TransactionGroup::whereNull('deleted_at')->whereIn('id', $chunk)->delete();
} }
} }
$end = round(microtime(true) - $start, 2); if (0 === $total) {
$this->info(sprintf('Verified empty groups in %s seconds', $end)); $this->friendlyInfo('Verified there are no empty groups.');
}
return 0; return 0;
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use DB; use DB;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -35,6 +36,8 @@ use Illuminate\Support\Facades\Log;
*/ */
class DeleteEmptyJournals extends Command class DeleteEmptyJournals extends Command
{ {
use ShowsFriendlyMessages;
/** /**
* The console command description. * The console command description.
* *
@@ -83,18 +86,22 @@ class DeleteEmptyJournals extends Command
Transaction::where('transaction_journal_id', (int)$row->transaction_journal_id)->delete(); Transaction::where('transaction_journal_id', (int)$row->transaction_journal_id)->delete();
$this->info(sprintf('Deleted transaction journal #%d because it had an uneven number of transactions.', $row->transaction_journal_id)); $this->friendlyWarning(
sprintf('Deleted transaction journal #%d because it had an uneven number of transactions.', $row->transaction_journal_id)
);
$total++; $total++;
} }
} }
if (0 === $total) { if (0 === $total) {
$this->info('No uneven transaction journals.'); $this->friendlyPositive('No uneven transaction journals.');
} }
} }
/**
* @return void
*/
private function deleteEmptyJournals(): void private function deleteEmptyJournals(): void
{ {
$start = microtime(true);
$count = 0; $count = 0;
$set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->groupBy('transaction_journals.id') ->groupBy('transaction_journals.id')
@@ -109,13 +116,11 @@ class DeleteEmptyJournals extends Command
} }
$this->info(sprintf('Deleted empty transaction journal #%d', $entry->id)); $this->friendlyInfo(sprintf('Deleted empty transaction journal #%d', $entry->id));
++$count; ++$count;
} }
if (0 === $count) { if (0 === $count) {
$this->info('No empty transaction journals.'); $this->friendlyPositive('No empty transaction journals.');
} }
$end = round(microtime(true) - $start, 2);
$this->info(sprintf('Verified empty journals in %s seconds', $end));
} }
} }

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