Compare commits

..

61 Commits

Author SHA1 Message Date
github-actions[bot]
c194a1ae20 Merge pull request #10368 from firefly-iii/release-1748230057
🤖 Automatically merge the PR into the develop branch.
2025-05-26 05:27:43 +02:00
JC5
7df3728394 🤖 Auto commit for release 'develop' on 2025-05-26 2025-05-26 05:27:37 +02:00
James Cole
acad0b5b55 Actual changelog 2025-05-25 07:13:06 +02:00
github-actions[bot]
605ab38660 Merge pull request #10365 from firefly-iii/release-1748149867
🤖 Automatically merge the PR into the develop branch.
2025-05-25 07:11:18 +02:00
JC5
75b21b20d8 🤖 Auto commit for release 'v6.2.15' on 2025-05-25 2025-05-25 07:11:07 +02:00
github-actions[bot]
e82459cd29 Merge pull request #10364 from firefly-iii/release-1748149540
🤖 Automatically merge the PR into the develop branch.
2025-05-25 07:05:46 +02:00
JC5
6dcf80967e 🤖 Auto commit for release 'develop' on 2025-05-25 2025-05-25 07:05:40 +02:00
James Cole
3d9edaeaac Restore missing facades. Whoops. 2025-05-25 07:01:31 +02:00
github-actions[bot]
4a5a31bf69 Merge pull request #10362 from firefly-iii/release-1748148584
🤖 Automatically merge the PR into the develop branch.
2025-05-25 06:49:50 +02:00
JC5
5f73e37657 🤖 Auto commit for release 'v6.2.14' on 2025-05-25 2025-05-25 06:49:44 +02:00
github-actions[bot]
7a9c0a8172 Merge pull request #10361 from firefly-iii/release-1748147782
🤖 Automatically merge the PR into the develop branch.
2025-05-25 06:36:31 +02:00
JC5
39914e2380 🤖 Auto commit for release 'develop' on 2025-05-25 2025-05-25 06:36:22 +02:00
James Cole
5a3240f69d Update changelog. 2025-05-25 06:27:05 +02:00
James Cole
19e5fd6277 Back to passport 12 for the time being. 2025-05-25 06:24:01 +02:00
James Cole
e9844dc2f5 Fix #10353 2025-05-24 19:48:09 +02:00
James Cole
c9f07c093a Fix tests and migrations 2025-05-24 17:30:08 +02:00
James Cole
6a986d8119 Merge pull request #10352 from firefly-iii/rector-cleanup-2
Rector cleanup 2
2025-05-24 17:20:07 +02:00
James Cole
f780de9e71 Replace magic facades 2025-05-24 17:19:18 +02:00
James Cole
b830bd2732 Replace magic facades 2025-05-24 17:15:46 +02:00
James Cole
e333dedeec Replace magic facades. 2025-05-24 17:07:12 +02:00
James Cole
6e5a08245c Rector code cleanup 2025-05-24 16:39:20 +02:00
James Cole
6a82a813e0 Fix version, I guess. 2025-05-24 07:24:28 +02:00
James Cole
7992ecf7f6 Use other workflow thing. 2025-05-24 07:22:18 +02:00
James Cole
967f7cb015 Move fix around 2025-05-24 06:37:19 +02:00
James Cole
7ca5e03752 Fix access rights in Sonar test 2025-05-24 06:36:06 +02:00
github-actions[bot]
abc6c611fa Merge pull request #10344 from firefly-iii/release-1748061087
🤖 Automatically merge the PR into the develop branch.
2025-05-24 06:31:36 +02:00
JC5
7673b939a1 🤖 Auto commit for release 'v6.2.13' on 2025-05-24 2025-05-24 06:31:28 +02:00
github-actions[bot]
c029bd42a7 Merge pull request #10343 from firefly-iii/release-1748060657
🤖 Automatically merge the PR into the develop branch.
2025-05-24 06:24:24 +02:00
JC5
63d051d9ba 🤖 Auto commit for release 'develop' on 2025-05-24 2025-05-24 06:24:17 +02:00
James Cole
1ec5ee08aa Update changelog and some final fixes. 2025-05-24 06:19:07 +02:00
James Cole
66be8ee80e Merge pull request #10342 from firefly-iii/fix-phpunit
Fix phpunit tests
2025-05-24 06:09:47 +02:00
James Cole
d26d1b4b87 Fix phpunit tests 2025-05-24 06:07:59 +02:00
James Cole
3716b50616 Merge pull request #10341 from firefly-iii/fix-10320
Fix #10320
2025-05-24 05:53:39 +02:00
James Cole
5e398bd07a Merge pull request #10340 from firefly-iii/nestor
Nestor
2025-05-24 05:53:10 +02:00
James Cole
2ee000debb Fix #10320 2025-05-24 05:52:46 +02:00
James Cole
b8e33201bd Not sure why I keep calling this tool nestor, it's called rector 2025-05-24 05:52:31 +02:00
James Cole
1c33be4828 Various nestor-related fixes. 2025-05-24 05:46:39 +02:00
James Cole
c40229e9fa Various nestor-related fixes. 2025-05-24 05:40:20 +02:00
James Cole
b7ec7625c0 Merge pull request #10339 from firefly-iii/fix-10336
Fix #10336
2025-05-24 05:36:04 +02:00
James Cole
64170d4957 Fix #10336 2025-05-24 05:35:31 +02:00
James Cole
d82c3b55e0 Merge pull request #10331 from firefly-iii/fix-10308
Fix #10308
2025-05-22 06:41:46 +02:00
James Cole
01800a3534 Fix #10308 2025-05-22 06:41:17 +02:00
James Cole
01404bf9cd Merge pull request #10330 from firefly-iii/fix-10305
Fix #10305
2025-05-22 06:11:22 +02:00
James Cole
2f9d73c0b3 Fix #10305 2025-05-22 06:10:54 +02:00
James Cole
670c2e4872 Merge pull request #10329 from firefly-iii/fix-10302
Fix #10302
2025-05-22 06:07:02 +02:00
James Cole
1261122a57 Fix #10302 2025-05-22 06:06:30 +02:00
James Cole
2a17ec9280 Merge pull request #10328 from firefly-iii/fix-10290
Fix #10290
2025-05-22 06:03:05 +02:00
James Cole
1424410115 Fix #10290 2025-05-22 06:02:32 +02:00
James Cole
f20eccf279 Update static cron token 2025-05-19 19:45:19 +02:00
github-actions[bot]
c18cbe1d26 Merge pull request #10319 from firefly-iii/release-1747670547
🤖 Automatically merge the PR into the develop branch.
2025-05-19 18:02:33 +02:00
JC5
d5a3ae43e0 🤖 Auto commit for release 'develop' on 2025-05-19 2025-05-19 18:02:27 +02:00
James Cole
767abacd27 Add spaces. 2025-05-19 17:58:37 +02:00
James Cole
2b3172ba8e Update packcages 2025-05-19 17:53:33 +02:00
github-actions[bot]
1ff8a48ca3 Merge pull request #10317 from firefly-iii/release-1747668888
🤖 Automatically merge the PR into the develop branch.
2025-05-19 17:34:55 +02:00
JC5
5b7645b6d5 🤖 Auto commit for release 'develop' on 2025-05-19 2025-05-19 17:34:48 +02:00
James Cole
ae82474b19 Update packages. 2025-05-19 17:30:53 +02:00
github-actions[bot]
d38c59c5b1 Merge pull request #10313 from firefly-iii/release-1747625288
🤖 Automatically merge the PR into the develop branch.
2025-05-19 05:28:15 +02:00
JC5
a4205afb7b 🤖 Auto commit for release 'develop' on 2025-05-19 2025-05-19 05:28:08 +02:00
github-actions[bot]
75e187ee34 Merge pull request #10303 from firefly-iii/release-1747228276
🤖 Automatically merge the PR into the develop branch.
2025-05-14 15:11:26 +02:00
JC5
a37ed82bb4 🤖 Auto commit for release 'develop' on 2025-05-14 2025-05-14 15:11:16 +02:00
Sander Dorigo
a7233de561 Downgrade 2025-05-14 15:06:10 +02:00
131 changed files with 782 additions and 823 deletions

View File

@@ -1349,16 +1349,16 @@
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1371,7 +1371,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1396,7 +1396,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.5.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -1412,7 +1412,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@@ -1496,16 +1496,16 @@
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
"version": "v3.5.1", "version": "v3.6.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": "7642f5e970b672283b7823222ae8ef8bbc160b9f" "reference": "59eb412e93815df44f05f342958efa9f46b1e586"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586",
"reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "reference": "59eb412e93815df44f05f342958efa9f46b1e586",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1519,7 +1519,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1552,7 +1552,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -1568,7 +1568,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
@@ -2305,16 +2305,16 @@
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/service-contracts.git",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2332,7 +2332,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -2368,7 +2368,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.5.1" "source": "https://github.com/symfony/service-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -2384,7 +2384,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2025-04-25T09:37:31+00:00"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",

View File

@@ -24,10 +24,15 @@
declare(strict_types=1); declare(strict_types=1);
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
return RectorConfig::configure() return RectorConfig::configure()
->withSkip([
ChangeOrIfContinueToMultiContinueRector::class,
])
->withPaths([ ->withPaths([
// __DIR__ . '/../app', // __DIR__ . '/../app',
__DIR__ . '/../app/Api',
__DIR__ . '/../app/Http', __DIR__ . '/../app/Http',
// __DIR__ . '/../bootstrap', // __DIR__ . '/../bootstrap',
// __DIR__ . '/../config', // __DIR__ . '/../config',
@@ -43,14 +48,14 @@ __DIR__ . '/../app/Http',
privatization: false, // leave false. privatization: false, // leave false.
naming : false, // leave false naming : false, // leave false
instanceOf : true, instanceOf : true,
earlyReturn : false, earlyReturn : true,
strictBooleans : false, strictBooleans : true,
carbon : false, carbon : true,
rectorPreset : false, rectorPreset : true,
phpunitCodeQuality : false, phpunitCodeQuality : true,
doctrineCodeQuality: false, doctrineCodeQuality: true,
symfonyCodeQuality : false, symfonyCodeQuality : true,
symfonyConfigs : false symfonyConfigs : true
) )
->withComposerBased( ->withComposerBased(
@@ -61,4 +66,5 @@ __DIR__ . '/../app/Http',
->withTypeCoverageLevel(0) ->withTypeCoverageLevel(0)
->withDeadCodeLevel(0) ->withDeadCodeLevel(0)
->withCodeQualityLevel(0) ->withCodeQualityLevel(0)
->withImportNames(removeUnusedImports: true);// import statements instead of full classes. ->withImportNames(removeUnusedImports: true);// import statements instead of full classes.

View File

@@ -289,7 +289,7 @@ ALLOW_WEBHOOKS=false
# #
# You can set this variable from a file by appending it with _FILE # You can set this variable from a file by appending it with _FILE
# #
STATIC_CRON_TOKEN= STATIC_CRON_TOKEN=PLEASE_REPLACE_WITH_32_CHAR_CODE
# You can fine tune the start-up of a Docker container by editing these environment variables. # 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 lots of inconsistent data. # Use this at your own risk. Disabling certain checks and features may result in lots of inconsistent data.

View File

@@ -51,7 +51,10 @@ jobs:
wget -q https://github.com/firefly-iii/test-fixtures/raw/refs/heads/main/test-database.sqlite -O storage/database/database.sqlite wget -q https://github.com/firefly-iii/test-fixtures/raw/refs/heads/main/test-database.sqlite -O storage/database/database.sqlite
- name: "Upgrades the database to the latest version" - name: "Upgrades the database to the latest version"
run: php artisan firefly-iii:upgrade-database run: |
php artisan firefly-iii:upgrade-database
chmod 600 storage/oauth-public.key
chmod 600 storage/oauth-private.key
- name: "Integrity Database Report" - name: "Integrity Database Report"
run: php artisan firefly-iii:report-integrity run: php artisan firefly-iii:report-integrity
@@ -63,7 +66,7 @@ jobs:
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan - name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master uses: SonarSource/sonarqube-scan-action@v5.2.0
env: env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Autocomplete; namespace FireflyIII\Api\V1\Controllers\Autocomplete;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest; use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
use FireflyIII\Enums\UserRoleEnum; use FireflyIII\Enums\UserRoleEnum;
@@ -102,7 +103,7 @@ class TransactionController extends Controller
if (is_numeric($data['query'])) { if (is_numeric($data['query'])) {
// search for group, not journal. // search for group, not journal.
$firstResult = $this->groupRepository->find((int) $data['query']); $firstResult = $this->groupRepository->find((int) $data['query']);
if (null !== $firstResult) { if ($firstResult instanceof TransactionGroup) {
// group may contain multiple journals, each a result: // group may contain multiple journals, each a result:
foreach ($firstResult->transactionJournals as $journal) { foreach ($firstResult->transactionJournals as $journal) {
$result->push($journal); $result->push($journal);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Chart; namespace FireflyIII\Api\V1\Controllers\Chart;
use FireflyIII\Models\TransactionCurrency;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Chart\ChartRequest; use FireflyIII\Api\V1\Requests\Chart\ChartRequest;
@@ -99,7 +100,7 @@ class AccountController extends Controller
private function renderAccountData(array $params, Account $account): void private function renderAccountData(array $params, Account $account): void
{ {
$currency = $this->repository->getAccountCurrency($account); $currency = $this->repository->getAccountCurrency($account);
if (null === $currency) { if (!$currency instanceof TransactionCurrency) {
$currency = $this->default; $currency = $this->default;
} }
$currentSet = [ $currentSet = [

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\CurrencyExchangeRate; namespace FireflyIII\Api\V1\Controllers\Models\CurrencyExchangeRate;
use Carbon\Carbon;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Models\CurrencyExchangeRate\DestroyRequest; use FireflyIII\Api\V1\Requests\Models\CurrencyExchangeRate\DestroyRequest;
use FireflyIII\Enums\UserRoleEnum; use FireflyIII\Enums\UserRoleEnum;
@@ -59,11 +60,11 @@ class DestroyController extends Controller
public function destroy(DestroyRequest $request, TransactionCurrency $from, TransactionCurrency $to): JsonResponse public function destroy(DestroyRequest $request, TransactionCurrency $from, TransactionCurrency $to): JsonResponse
{ {
$date = $request->getDate(); $date = $request->getDate();
if (null === $date) { if (!$date instanceof Carbon) {
throw new ValidationException('Date is required'); throw new ValidationException('Date is required');
} }
$rate = $this->repository->getSpecificRateOnDate($from, $to, $date); $rate = $this->repository->getSpecificRateOnDate($from, $to, $date);
if (null === $rate) { if (!$rate instanceof CurrencyExchangeRate) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
$this->repository->deleteRate($rate); $this->repository->deleteRate($rate);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\CurrencyExchangeRate; namespace FireflyIII\Api\V1\Controllers\Models\CurrencyExchangeRate;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Api\V1\Requests\Models\CurrencyExchangeRate\StoreRequest; use FireflyIII\Api\V1\Requests\Models\CurrencyExchangeRate\StoreRequest;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
use FireflyIII\Repositories\ExchangeRate\ExchangeRateRepositoryInterface; use FireflyIII\Repositories\ExchangeRate\ExchangeRateRepositoryInterface;
@@ -61,11 +62,11 @@ class StoreController extends Controller
// already has rate? // already has rate?
$object = $this->repository->getSpecificRateOnDate($from, $to, $date); $object = $this->repository->getSpecificRateOnDate($from, $to, $date);
if (null !== $object) { if ($object instanceof CurrencyExchangeRate) {
// just update it, no matter. // just update it, no matter.
$rate = $this->repository->updateExchangeRate($object, $rate, $date); $rate = $this->repository->updateExchangeRate($object, $rate, $date);
} }
if (null === $object) { if (!$object instanceof CurrencyExchangeRate) {
// store new // store new
$rate = $this->repository->storeExchangeRate($from, $to, $rate, $date); $rate = $this->repository->storeExchangeRate($from, $to, $rate, $date);
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency; namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
use Illuminate\Support\Facades\Validator;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
@@ -74,15 +75,15 @@ class DestroyController extends Controller
if (!$this->userRepository->hasRole($admin, 'owner')) { if (!$this->userRepository->hasRole($admin, 'owner')) {
// access denied: // access denied:
$messages = ['currency_code' => '200005: You need the "owner" role to do this.']; $messages = ['currency_code' => '200005: You need the "owner" role to do this.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
if ($this->repository->currencyInUse($currency)) { if ($this->repository->currencyInUse($currency)) {
$messages = ['currency_code' => '200006: Currency in use.']; $messages = ['currency_code' => '200006: Currency in use.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
if ($this->repository->isFallbackCurrency($currency)) { if ($this->repository->isFallbackCurrency($currency)) {
$messages = ['currency_code' => '200026: Currency is fallback.']; $messages = ['currency_code' => '200026: Currency is fallback.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
$this->repository->destroy($currency); $this->repository->destroy($currency);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLink; namespace FireflyIII\Api\V1\Controllers\Models\TransactionLink;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Models\TransactionLink\StoreRequest; use FireflyIII\Api\V1\Requests\Models\TransactionLink\StoreRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -81,7 +82,7 @@ class StoreController extends Controller
$data = $request->getAll(); $data = $request->getAll();
$inward = $this->journalRepository->find($data['inward_id'] ?? 0); $inward = $this->journalRepository->find($data['inward_id'] ?? 0);
$outward = $this->journalRepository->find($data['outward_id'] ?? 0); $outward = $this->journalRepository->find($data['outward_id'] ?? 0);
if (null === $inward || null === $outward) { if (!$inward instanceof TransactionJournal || !$outward instanceof TransactionJournal) {
throw new FireflyException('200024: Source or destination does not exist.'); throw new FireflyException('200024: Source or destination does not exist.');
} }
$data['direction'] = 'inward'; $data['direction'] = 'inward';

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType; namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType;
use Illuminate\Support\Facades\Validator;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Models\TransactionLinkType\StoreRequest; use FireflyIII\Api\V1\Requests\Models\TransactionLinkType\StoreRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -81,7 +82,7 @@ class StoreController extends Controller
if (!$this->userRepository->hasRole($admin, 'owner')) { if (!$this->userRepository->hasRole($admin, 'owner')) {
// access denied: // access denied:
$messages = ['name' => '200005: You need the "owner" role to do this.']; $messages = ['name' => '200005: You need the "owner" role to do this.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
$data = $request->getAll(); $data = $request->getAll();
// if currency ID is 0, find the currency by the code: // if currency ID is 0, find the currency by the code:

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType; namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType;
use Illuminate\Support\Facades\Validator;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Models\TransactionLinkType\UpdateRequest; use FireflyIII\Api\V1\Requests\Models\TransactionLinkType\UpdateRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -85,7 +86,7 @@ class UpdateController extends Controller
if (!$this->userRepository->hasRole($admin, 'owner')) { if (!$this->userRepository->hasRole($admin, 'owner')) {
$messages = ['name' => '200005: You need the "owner" role to do this.']; $messages = ['name' => '200005: You need the "owner" role to do this.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
$data = $request->getAll(); $data = $request->getAll();

View File

@@ -674,15 +674,14 @@ class BasicController extends Controller
*/ */
protected function notInDateRange(Carbon $date, Carbon $start, Carbon $end): bool // Validate a preference protected function notInDateRange(Carbon $date, Carbon $start, Carbon $end): bool // Validate a preference
{ {
$result = false;
if ($start->greaterThanOrEqualTo($date) && $end->greaterThanOrEqualTo($date)) { if ($start->greaterThanOrEqualTo($date) && $end->greaterThanOrEqualTo($date)) {
$result = true; return true;
} }
// start and end in the past? use $end // start and end in the past? use $end
if ($start->lessThanOrEqualTo($date) && $end->lessThanOrEqualTo($date)) { if ($start->lessThanOrEqualTo($date) && $end->lessThanOrEqualTo($date)) {
$result = true; return true;
} }
return $result; return false;
} }
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\System; namespace FireflyIII\Api\V1\Controllers\System;
use Illuminate\Support\Facades\Validator;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\System\UpdateRequest; use FireflyIII\Api\V1\Requests\System\UpdateRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -158,7 +159,7 @@ class ConfigurationController extends Controller
$rules = ['value' => 'required']; $rules = ['value' => 'required'];
if (!$this->repository->hasRole(auth()->user(), 'owner')) { if (!$this->repository->hasRole(auth()->user(), 'owner')) {
$messages = ['value' => '200005: You need the "owner" role to do this.']; $messages = ['value' => '200005: You need the "owner" role to do this.'];
\Validator::make([], $rules, $messages)->validate(); Validator::make([], $rules, $messages)->validate();
} }
$data = $request->getAll(); $data = $request->getAll();
$shortName = str_replace('configuration.', '', $name); $shortName = str_replace('configuration.', '', $name);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\System; namespace FireflyIII\Api\V1\Requests\System;
use Carbon\Carbon;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
@@ -58,7 +59,7 @@ class CronRequest extends FormRequest
$data['date'] = $this->getCarbonDate('date'); $data['date'] = $this->getCarbonDate('date');
} }
// catch NULL. // catch NULL.
if (null === $data['date']) { if (!$data['date'] instanceof Carbon) {
$data['date'] = today(config('app.timezone')); $data['date'] = today(config('app.timezone'));
} }

View File

@@ -90,7 +90,7 @@ class AccountController extends Controller
'meta' => [ 'meta' => [
'type' => $account->accountType->type, 'type' => $account->accountType->type,
// TODO is multi currency property. // TODO is multi currency property.
'currency_id' => null === $currency ? null : (string) $currency->id, 'currency_id' => $currency instanceof TransactionCurrency ? (string) $currency->id : null,
'currency_code' => $currency?->code, 'currency_code' => $currency?->code,
'currency_symbol' => $currency?->symbol, 'currency_symbol' => $currency?->symbol,
'currency_decimal_places' => $currency?->decimal_places, 'currency_decimal_places' => $currency?->decimal_places,

View File

@@ -94,7 +94,7 @@ class AccountController extends Controller
private function renderAccountData(array $params, Account $account): void private function renderAccountData(array $params, Account $account): void
{ {
$currency = $this->repository->getAccountCurrency($account); $currency = $this->repository->getAccountCurrency($account);
if (null === $currency) { if (!$currency instanceof TransactionCurrency) {
$currency = $this->default; $currency = $this->default;
} }
$currentSet = [ $currentSet = [

View File

@@ -117,7 +117,7 @@ class Controller extends BaseController
app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr((string) $date, 0, 20), $e->getMessage())); app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr((string) $date, 0, 20), $e->getMessage()));
} }
// out of range? set to null. // out of range? set to null.
if (null !== $obj && ($obj->year <= 1900 || $obj->year > 2099)) { if ($obj instanceof Carbon && ($obj->year <= 1900 || $obj->year > 2099)) {
app('log')->warning(sprintf('Refuse to use date "%s" in API v2 controller parameter check: %s', $field, $obj->toAtomString())); app('log')->warning(sprintf('Refuse to use date "%s" in API v2 controller parameter check: %s', $field, $obj->toAtomString()));
$obj = null; $obj = null;
} }

View File

@@ -398,15 +398,14 @@ class BasicController extends Controller
*/ */
protected function notInDateRange(Carbon $date, Carbon $start, Carbon $end): bool // Validate a preference protected function notInDateRange(Carbon $date, Carbon $start, Carbon $end): bool // Validate a preference
{ {
$result = false;
if ($start->greaterThanOrEqualTo($date) && $end->greaterThanOrEqualTo($date)) { if ($start->greaterThanOrEqualTo($date) && $end->greaterThanOrEqualTo($date)) {
$result = true; return true;
} }
// start and end in the past? use $end // start and end in the past? use $end
if ($start->lessThanOrEqualTo($date) && $end->lessThanOrEqualTo($date)) { if ($start->lessThanOrEqualTo($date) && $end->lessThanOrEqualTo($date)) {
$result = true; return true;
} }
return $result; return false;
} }
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V2\Controllers\Transaction\List; namespace FireflyIII\Api\V2\Controllers\Transaction\List;
use Carbon\Carbon;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
use FireflyIII\Api\V2\Request\Model\Transaction\ListRequest; use FireflyIII\Api\V2\Request\Model\Transaction\ListRequest;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
@@ -62,11 +63,11 @@ class AccountController extends Controller
$start = $request->getStartDate(); $start = $request->getStartDate();
$end = $request->getEndDate(); $end = $request->getEndDate();
if (null !== $start) { if ($start instanceof Carbon) {
app('log')->debug(sprintf('Set start date to %s', $start->toIso8601String())); app('log')->debug(sprintf('Set start date to %s', $start->toIso8601String()));
$collector->setStart($start); $collector->setStart($start);
} }
if (null !== $end) { if ($end instanceof Carbon) {
app('log')->debug(sprintf('Set end date to %s', $start->toIso8601String())); app('log')->debug(sprintf('Set end date to %s', $start->toIso8601String()));
$collector->setEnd($end); $collector->setEnd($end);
} }

View File

@@ -53,7 +53,7 @@ class InfiniteListRequest extends FormRequest
$start = $this->getStartDate(); $start = $this->getStartDate();
$end = $this->getEndDate(); $end = $this->getEndDate();
if (null !== $start && null !== $end) { if ($start instanceof Carbon && $end instanceof Carbon) {
$array['start'] = $start->format('Y-m-d'); $array['start'] = $start->format('Y-m-d');
$array['end'] = $end->format('Y-m-d'); $array['end'] = $end->format('Y-m-d');
} }

View File

@@ -49,7 +49,7 @@ class ListRequest extends FormRequest
$start = $this->getStartDate(); $start = $this->getStartDate();
$end = $this->getEndDate(); $end = $this->getEndDate();
if (null !== $start && null !== $end) { if ($start instanceof Carbon && $end instanceof Carbon) {
$array['start'] = $start->format('Y-m-d'); $array['start'] = $start->format('Y-m-d');
$array['end'] = $end->format('Y-m-d'); $array['end'] = $end->format('Y-m-d');
} }

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Schema;
class CorrectsDatabase extends Command class CorrectsDatabase extends Command
{ {
@@ -40,7 +41,7 @@ class CorrectsDatabase extends Command
public function handle(): int public function handle(): int
{ {
// 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.'); $this->friendlyError('No "users"-table, will not continue.');
return 1; return 1;

View File

@@ -163,7 +163,7 @@ class CorrectsUnevenAmount extends Command
Log::error($e->getTraceAsString()); Log::error($e->getTraceAsString());
} }
if (0 !== $res) { if (0 !== $res) {
$this->fixJournal($entry->transaction_journal_id); $this->fixJournal((int) $entry->transaction_journal_id);
} }
} }
} }

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands\Integrity;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Schema;
class ReportsIntegrity extends Command class ReportsIntegrity extends Command
{ {
@@ -41,7 +42,7 @@ class ReportsIntegrity extends Command
public function handle(): int public function handle(): int
{ {
// if table does not exist, return false // if table does not exist, return false
if (!\Schema::hasTable('users')) { if (!Schema::hasTable('users')) {
return 1; return 1;
} }
$commands = [ $commands = [

View File

@@ -31,6 +31,7 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Schema;
class AddsTransactionIdentifiers extends Command class AddsTransactionIdentifiers extends Command
{ {
@@ -65,7 +66,7 @@ class AddsTransactionIdentifiers extends Command
} }
// if table does not exist, return false // if table does not exist, return false
if (!\Schema::hasTable('transaction_journals')) { if (!Schema::hasTable('transaction_journals')) {
return 0; return 0;
} }

View File

@@ -32,6 +32,7 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Rules\UniqueIban; use FireflyIII\Rules\UniqueIban;
use FireflyIII\Services\Internal\Update\AccountUpdateService; use FireflyIII\Services\Internal\Update\AccountUpdateService;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Validator;
/** /**
* Class TransactionFactory * Class TransactionFactory
@@ -152,7 +153,7 @@ class TransactionFactory
return; return;
} }
// validate info: // validate info:
$validator = \Validator::make(['iban' => $this->accountInformation['iban']], [ $validator = Validator::make(['iban' => $this->accountInformation['iban']], [
'iban' => ['required', new UniqueIban($this->account, $this->account->accountType->type)], 'iban' => ['required', new UniqueIban($this->account, $this->account->accountType->type)],
]); ]);
if ($validator->fails()) { if ($validator->fails()) {

View File

@@ -54,8 +54,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Auth\Events\Login; use Illuminate\Auth\Events\Login;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use Mail;
/** /**
* Class UserEventHandler. * Class UserEventHandler.
@@ -266,7 +266,7 @@ class UserEventHandler
$url = route('profile.confirm-email-change', [$token->data]); $url = route('profile.confirm-email-change', [$token->data]);
try { try {
\Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url)); Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url));
} catch (\Exception $e) { } catch (\Exception $e) {
app('log')->error($e->getMessage()); app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString()); app('log')->error($e->getTraceAsString());
@@ -291,7 +291,7 @@ class UserEventHandler
$url = route('profile.undo-email-change', [$token->data, $hashed]); $url = route('profile.undo-email-change', [$token->data, $hashed]);
try { try {
\Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url)); Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url));
} catch (\Exception $e) { } catch (\Exception $e) {
app('log')->error($e->getMessage()); app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString()); app('log')->error($e->getTraceAsString());
@@ -355,7 +355,7 @@ class UserEventHandler
$url = route('invite', [$event->invitee->invite_code]); $url = route('invite', [$event->invitee->invite_code]);
try { try {
\Mail::to($invitee)->send(new InvitationMail($invitee, $admin, $url)); Mail::to($invitee)->send(new InvitationMail($invitee, $admin, $url));
} catch (\Exception $e) { } catch (\Exception $e) {
app('log')->error($e->getMessage()); app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString()); app('log')->error($e->getTraceAsString());

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Models\Location;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\AccountFormRequest; use FireflyIII\Http\Requests\AccountFormRequest;
@@ -87,11 +88,11 @@ class EditController extends Controller
$roles = $this->getRoles(); $roles = $this->getRoles();
$liabilityTypes = $this->getLiabilityTypes(); $liabilityTypes = $this->getLiabilityTypes();
$location = $repository->getLocation($account); $location = $repository->getLocation($account);
$latitude = null !== $location ? $location->latitude : config('firefly.default_location.latitude'); $latitude = $location instanceof Location ? $location->latitude : config('firefly.default_location.latitude');
$longitude = null !== $location ? $location->longitude : config('firefly.default_location.longitude'); $longitude = $location instanceof Location ? $location->longitude : config('firefly.default_location.longitude');
$zoomLevel = null !== $location ? $location->zoom_level : config('firefly.default_location.zoom_level'); $zoomLevel = $location instanceof Location ? $location->zoom_level : config('firefly.default_location.zoom_level');
$canEditCurrency = 0 === $account->piggyBanks()->count(); $canEditCurrency = 0 === $account->piggyBanks()->count();
$hasLocation = null !== $location; $hasLocation = $location instanceof Location;
$locations = [ $locations = [
'location' => [ 'location' => [
'latitude' => old('location_latitude') ?? $latitude, 'latitude' => old('location_latitude') ?? $latitude,

View File

@@ -94,7 +94,7 @@ class ReconcileController extends Controller
// get start and end // get start and end
if (null === $start && null === $end) { if (!$start instanceof Carbon && !$end instanceof Carbon) {
/** @var Carbon $start */ /** @var Carbon $start */
$start = clone session('start', app('navigation')->startOfPeriod(new Carbon(), $range)); $start = clone session('start', app('navigation')->startOfPeriod(new Carbon(), $range));

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use Carbon\Carbon;
use FireflyIII\Helpers\Update\UpdateTrait; use FireflyIII\Helpers\Update\UpdateTrait;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
@@ -96,7 +97,7 @@ class UpdateController extends Controller
$channel = in_array($channel, ['stable', 'beta', 'alpha'], true) ? $channel : 'stable'; $channel = in_array($channel, ['stable', 'beta', 'alpha'], true) ? $channel : 'stable';
app('fireflyconfig')->set('permission_update_check', $checkForUpdates); app('fireflyconfig')->set('permission_update_check', $checkForUpdates);
app('fireflyconfig')->set('last_update_check', time()); app('fireflyconfig')->set('last_update_check', Carbon::now()->getTimestamp());
app('fireflyconfig')->set('update_channel', $channel); app('fireflyconfig')->set('update_channel', $channel);
session()->flash('success', (string) trans('firefly.configuration_updated')); session()->flash('success', (string) trans('firefly.configuration_updated'));

View File

@@ -34,6 +34,8 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use function Safe\parse_url;
/** /**
* Class ForgotPasswordController * Class ForgotPasswordController
*/ */
@@ -101,7 +103,7 @@ class ForgotPasswordController extends Controller
*/ */
private function validateHost(): void private function validateHost(): void
{ {
$configuredHost = \Safe\parse_url((string) config('app.url'), PHP_URL_HOST); $configuredHost = parse_url((string) config('app.url'), PHP_URL_HOST);
if (false === $configuredHost || null === $configuredHost) { if (false === $configuredHost || null === $configuredHost) {
throw new FireflyException('Please set a valid and correct Firefly III URL in the APP_URL environment variable.'); throw new FireflyException('Please set a valid and correct Firefly III URL in the APP_URL environment variable.');
} }

View File

@@ -23,7 +23,9 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Auth; namespace FireflyIII\Http\Controllers\Auth;
use Cookie; use Carbon\Carbon;
use FireflyIII\User;
use Illuminate\Support\Facades\Cookie;
use FireflyIII\Events\ActuallyLoggedIn; use FireflyIII\Events\ActuallyLoggedIn;
use FireflyIII\Events\Security\UnknownUserAttemptedLogin; use FireflyIII\Events\Security\UnknownUserAttemptedLogin;
use FireflyIII\Events\Security\UserAttemptedLogin; use FireflyIII\Events\Security\UserAttemptedLogin;
@@ -44,6 +46,7 @@ use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use Symfony\Component\HttpFoundation\Response as ResponseAlias;
/** /**
* Class LoginController * Class LoginController
@@ -130,11 +133,11 @@ class LoginController extends Controller
app('log')->warning('Login attempt failed.'); app('log')->warning('Login attempt failed.');
$username = (string) $request->get($this->username()); $username = (string) $request->get($this->username());
$user = $this->repository->findByEmail($username); $user = $this->repository->findByEmail($username);
if (null === $user) { if (!$user instanceof User) {
// send event to owner. // send event to owner.
event(new UnknownUserAttemptedLogin($username)); event(new UnknownUserAttemptedLogin($username));
} }
if (null !== $user) { if ($user instanceof User) {
event(new UserAttemptedLogin($user)); event(new UserAttemptedLogin($user));
} }
@@ -198,7 +201,7 @@ class LoginController extends Controller
// also logout current 2FA tokens. // also logout current 2FA tokens.
$cookieName = config('google2fa.cookie_name', 'google2fa_token'); $cookieName = config('google2fa.cookie_name', 'google2fa_token');
\Cookie::forget($cookieName); Cookie::forget($cookieName);
$this->guard()->logout(); $this->guard()->logout();
@@ -209,7 +212,7 @@ class LoginController extends Controller
$this->loggedOut($request); $this->loggedOut($request);
return $request->wantsJson() return $request->wantsJson()
? new Response('', 204) ? new Response('', ResponseAlias::HTTP_NO_CONTENT)
: redirect('/'); : redirect('/');
} }
@@ -220,7 +223,7 @@ class LoginController extends Controller
* *
* @throws FireflyException * @throws FireflyException
*/ */
public function showLoginForm(Request $request) public function showLoginForm(?Request $request = null)
{ {
Log::channel('audit')->info('Show login form (1.1).'); Log::channel('audit')->info('Show login form (1.1).');
@@ -246,13 +249,13 @@ class LoginController extends Controller
$allowReset = false; $allowReset = false;
} }
$email = $request->old('email'); $email = $request?->old('email');
$remember = $request->old('remember'); $remember = $request?->old('remember');
$storeInCookie = config('google2fa.store_in_cookie', false); $storeInCookie = config('google2fa.store_in_cookie', false);
if (false !== $storeInCookie) { if (false !== $storeInCookie) {
$cookieName = config('google2fa.cookie_name', 'google2fa_token'); $cookieName = config('google2fa.cookie_name', 'google2fa_token');
\Cookie::queue(\Cookie::make($cookieName, 'invalid-'.time())); Cookie::queue(Cookie::make($cookieName, 'invalid-'.Carbon::now()->getTimestamp()));
} }
$usernameField = $this->username(); $usernameField = $this->username();

View File

@@ -130,7 +130,7 @@ class RegisterController extends Controller
$allowRegistration = false; $allowRegistration = false;
} }
if ('web' !== $guard) { if ('web' !== $guard) {
$allowRegistration = false; return false;
} }
return $allowRegistration; return $allowRegistration;
@@ -175,7 +175,7 @@ class RegisterController extends Controller
* *
* @throws FireflyException * @throws FireflyException
*/ */
public function showRegistrationForm(Request $request) public function showRegistrationForm(?Request $request = null)
{ {
$isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site'))->data; $isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$pageTitle = (string) trans('firefly.register_page_title'); $pageTitle = (string) trans('firefly.register_page_title');
@@ -187,7 +187,7 @@ class RegisterController extends Controller
return view('error', compact('message')); return view('error', compact('message'));
} }
$email = $request->old('email'); $email = $request?->old('email');
return view('auth.register', compact('isDemoSite', 'email', 'pageTitle')); return view('auth.register', compact('isDemoSite', 'email', 'pageTitle'));
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Auth; namespace FireflyIII\Http\Controllers\Auth;
use Carbon\Carbon;
use FireflyIII\Events\Security\MFABackupFewLeft; use FireflyIII\Events\Security\MFABackupFewLeft;
use FireflyIII\Events\Security\MFABackupNoLeft; use FireflyIII\Events\Security\MFABackupNoLeft;
use FireflyIII\Events\Security\MFAManyFailedAttempts; use FireflyIII\Events\Security\MFAManyFailedAttempts;
@@ -129,7 +130,7 @@ class TwoFactorController extends Controller
*/ */
private function inMFAHistory(string $mfaCode, array $mfaHistory): bool private function inMFAHistory(string $mfaCode, array $mfaHistory): bool
{ {
$now = time(); $now = Carbon::now()->getTimestamp();
foreach ($mfaHistory as $entry) { foreach ($mfaHistory as $entry) {
$time = $entry['time']; $time = $entry['time'];
$code = $entry['code']; $code = $entry['code'];
@@ -149,7 +150,7 @@ class TwoFactorController extends Controller
/** @var array $mfaHistory */ /** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data; $mfaHistory = app('preferences')->get('mfa_history', [])->data;
$newHistory = []; $newHistory = [];
$now = time(); $now = Carbon::now()->getTimestamp();
foreach ($mfaHistory as $entry) { foreach ($mfaHistory as $entry) {
$time = $entry['time']; $time = $entry['time'];
$code = $entry['code']; $code = $entry['code'];
@@ -184,7 +185,7 @@ class TwoFactorController extends Controller
/** @var array $mfaHistory */ /** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data; $mfaHistory = app('preferences')->get('mfa_history', [])->data;
$entry = [ $entry = [
'time' => time(), 'time' => Carbon::now()->getTimestamp(),
'code' => $mfaCode, 'code' => $mfaCode,
]; ];
$mfaHistory[] = $entry; $mfaHistory[] = $entry;

View File

@@ -143,13 +143,13 @@ class BudgetLimitController extends Controller
// first search for existing one and update it if necessary. // first search for existing one and update it if necessary.
$currency = $this->currencyRepos->find((int) $request->get('transaction_currency_id')); $currency = $this->currencyRepos->find((int) $request->get('transaction_currency_id'));
$budget = $this->repository->find((int) $request->get('budget_id')); $budget = $this->repository->find((int) $request->get('budget_id'));
if (null === $currency || null === $budget) { if (!$currency instanceof TransactionCurrency || !$budget instanceof Budget) {
throw new FireflyException('No valid currency or budget.'); throw new FireflyException('No valid currency or budget.');
} }
$start = Carbon::createFromFormat('Y-m-d', $request->get('start')); $start = Carbon::createFromFormat('Y-m-d', $request->get('start'));
$end = Carbon::createFromFormat('Y-m-d', $request->get('end')); $end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
if (null === $start || null === $end) { if (!$start instanceof Carbon || !$end instanceof Carbon) {
return response()->json([]); return response()->json([]);
} }
@@ -167,7 +167,7 @@ class BudgetLimitController extends Controller
// sanity check on amount: // sanity check on amount:
if (0 === bccomp($amount, '0')) { if (0 === bccomp($amount, '0')) {
if (null !== $limit) { if ($limit instanceof BudgetLimit) {
$this->blRepository->destroyBudgetLimit($limit); $this->blRepository->destroyBudgetLimit($limit);
} }
@@ -181,11 +181,11 @@ class BudgetLimitController extends Controller
$amount = bcmul($amount, '-1'); $amount = bcmul($amount, '-1');
} }
if (null !== $limit) { if ($limit instanceof BudgetLimit) {
$limit->amount = $amount; $limit->amount = $amount;
$limit->save(); $limit->save();
} }
if (null === $limit) { if (!$limit instanceof BudgetLimit) {
$limit = $this->blRepository->store( $limit = $this->blRepository->store(
[ [
'budget_id' => $request->get('budget_id'), 'budget_id' => $request->get('budget_id'),

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Budget; namespace FireflyIII\Http\Controllers\Budget;
use FireflyIII\Models\AutoBudget;
use FireflyIII\Enums\AutoBudgetType; use FireflyIII\Enums\AutoBudgetType;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
@@ -95,7 +96,7 @@ class EditController extends Controller
'active' => $hasOldInput ? (bool) $request->old('active') : $budget->active, 'active' => $hasOldInput ? (bool) $request->old('active') : $budget->active,
'auto_budget_currency_id' => $hasOldInput ? (int) $request->old('auto_budget_currency_id') : $this->defaultCurrency->id, 'auto_budget_currency_id' => $hasOldInput ? (int) $request->old('auto_budget_currency_id') : $this->defaultCurrency->id,
]; ];
if (null !== $autoBudget) { if ($autoBudget instanceof AutoBudget) {
$amount = $hasOldInput ? $request->old('auto_budget_amount') : $autoBudget->amount; $amount = $hasOldInput ? $request->old('auto_budget_amount') : $autoBudget->amount;
if (is_array($amount)) { if (is_array($amount)) {
$amount = '0'; $amount = '0';

View File

@@ -316,7 +316,7 @@ class IndexController extends Controller
foreach ($budgetIds as $index => $budgetId) { foreach ($budgetIds as $index => $budgetId) {
$budgetId = (int) $budgetId; $budgetId = (int) $budgetId;
$budget = $repository->find($budgetId); $budget = $repository->find($budgetId);
if (null !== $budget) { if ($budget instanceof Budget) {
app('log')->debug(sprintf('Set budget #%d ("%s") to position %d', $budget->id, $budget->name, $index + 1)); app('log')->debug(sprintf('Set budget #%d ("%s") to position %d', $budget->id, $budget->name, $index + 1));
$repository->setBudgetOrder($budget, $index + 1); $repository->setBudgetOrder($budget, $index + 1);
} }

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Budget; namespace FireflyIII\Http\Controllers\Budget;
use FireflyIII\Models\TransactionJournal;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Enums\TransactionTypeEnum; use FireflyIII\Enums\TransactionTypeEnum;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -90,7 +91,7 @@ class ShowController extends Controller
// get first journal ever to set off the budget period overview. // get first journal ever to set off the budget period overview.
$first = $this->journalRepos->firstNull(); $first = $this->journalRepos->firstNull();
$firstDate = null !== $first ? $first->date : $start; $firstDate = $first instanceof TransactionJournal ? $first->date : $start;
$periods = $this->getNoBudgetPeriodOverview($firstDate, $end); $periods = $this->getNoBudgetPeriodOverview($firstDate, $end);
$page = (int) $request->get('page'); $page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
@@ -115,7 +116,7 @@ class ShowController extends Controller
{ {
$subTitle = (string) trans('firefly.all_journals_without_budget'); $subTitle = (string) trans('firefly.all_journals_without_budget');
$first = $this->journalRepos->firstNull(); $first = $this->journalRepos->firstNull();
$start = null === $first ? new Carbon() : $first->date; $start = $first instanceof TransactionJournal ? $first->date : new Carbon();
$end = today(config('app.timezone')); $end = today(config('app.timezone'));
$page = (int) $request->get('page'); $page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) app('preferences')->get('listPageSize', 50)->data;

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Category; namespace FireflyIII\Http\Controllers\Category;
use FireflyIII\Models\TransactionJournal;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Enums\TransactionTypeEnum; use FireflyIII\Enums\TransactionTypeEnum;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@@ -119,7 +120,7 @@ class NoCategoryController extends Controller
app('log')->debug('Start of noCategory()'); app('log')->debug('Start of noCategory()');
$subTitle = (string) trans('firefly.all_journals_without_category'); $subTitle = (string) trans('firefly.all_journals_without_category');
$first = $this->journalRepos->firstNull(); $first = $this->journalRepos->firstNull();
$start = null === $first ? new Carbon() : $first->date; $start = $first instanceof TransactionJournal ? $first->date : new Carbon();
$end = today(config('app.timezone')); $end = today(config('app.timezone'));
app('log')->debug(sprintf('Start for noCategory() is %s', $start->format('Y-m-d'))); app('log')->debug(sprintf('Start for noCategory() is %s', $start->format('Y-m-d')));
app('log')->debug(sprintf('End for noCategory() is %s', $end->format('Y-m-d'))); app('log')->debug(sprintf('End for noCategory() is %s', $end->format('Y-m-d')));

View File

@@ -43,6 +43,8 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use function Safe\json_encode;
/** /**
* Class AccountController. * Class AccountController.
*/ */
@@ -468,14 +470,14 @@ class AccountController extends Controller
Log::debug('Balances exist at:'); Log::debug('Balances exist at:');
foreach ($range as $key => $value) { foreach ($range as $key => $value) {
$newRange[] = ['date' => $key, 'info' => $value]; $newRange[] = ['date' => $key, 'info' => $value];
Log::debug(sprintf('%d - %s (%s)', count($newRange) - 1, $key, \Safe\json_encode($value))); Log::debug(sprintf('%d - %s (%s)', count($newRange) - 1, $key, json_encode($value)));
} }
$carbon = Carbon::createFromFormat('Y-m-d', $newRange[0]['date'])->endOfDay(); $carbon = Carbon::createFromFormat('Y-m-d', $newRange[0]['date'])->endOfDay();
Log::debug(sprintf('Start of loop, $carbon is %s', $carbon->format('Y-m-d H:i:s'))); Log::debug(sprintf('Start of loop, $carbon is %s', $carbon->format('Y-m-d H:i:s')));
while ($end->gte($current)) { while ($end->gte($current)) {
$momentBalance = $previous; $momentBalance = $previous;
// $theDate = $current->format('Y-m-d'); // $theDate = $current->format('Y-m-d');
Log::debug(sprintf('Now at %s, with momentBalance %s', $current->format('Y-m-d H:i:s'), \Safe\json_encode($momentBalance))); Log::debug(sprintf('Now at %s, with momentBalance %s', $current->format('Y-m-d H:i:s'), json_encode($momentBalance)));
// loop over the array with balances, find one that is earlier or on the same day. // loop over the array with balances, find one that is earlier or on the same day.
while ($carbon->lte($current) && array_key_exists($expectedIndex, $newRange)) { while ($carbon->lte($current) && array_key_exists($expectedIndex, $newRange)) {
@@ -490,7 +492,7 @@ class AccountController extends Controller
$carbon = Carbon::createFromFormat('Y-m-d', $newRange[$expectedIndex]['date'])->endOfDay(); $carbon = Carbon::createFromFormat('Y-m-d', $newRange[$expectedIndex]['date'])->endOfDay();
} }
} }
Log::debug(sprintf('momentBalance is now %s', \Safe\json_encode($momentBalance))); Log::debug(sprintf('momentBalance is now %s', json_encode($momentBalance)));
$return = $this->updateChartKeys($return, $momentBalance); $return = $this->updateChartKeys($return, $momentBalance);
$previous = $momentBalance; $previous = $momentBalance;

View File

@@ -202,7 +202,7 @@ class BudgetController extends Controller
{ {
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
$budgetLimitId = null === $budgetLimit ? 0 : $budgetLimit->id; $budgetLimitId = $budgetLimit instanceof BudgetLimit ? $budgetLimit->id : 0;
$cache = new CacheProperties(); $cache = new CacheProperties();
$cache->addProperty($budget->id); $cache->addProperty($budget->id);
$cache->addProperty($this->convertToNative); $cache->addProperty($this->convertToNative);
@@ -211,7 +211,7 @@ class BudgetController extends Controller
$start = session('first', today(config('app.timezone'))->startOfYear()); $start = session('first', today(config('app.timezone'))->startOfYear());
$end = today(); $end = today();
if (null !== $budgetLimit) { if ($budgetLimit instanceof BudgetLimit) {
$start = $budgetLimit->start_date; $start = $budgetLimit->start_date;
$end = $budgetLimit->end_date; $end = $budgetLimit->end_date;
$collector->setRange($budgetLimit->start_date, $budgetLimit->end_date)->setNormalCurrency($budgetLimit->transactionCurrency); $collector->setRange($budgetLimit->start_date, $budgetLimit->end_date)->setNormalCurrency($budgetLimit->transactionCurrency);
@@ -285,7 +285,7 @@ class BudgetController extends Controller
{ {
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
$budgetLimitId = null === $budgetLimit ? 0 : $budgetLimit->id; $budgetLimitId = $budgetLimit instanceof BudgetLimit ? $budgetLimit->id : 0;
$cache = new CacheProperties(); $cache = new CacheProperties();
$cache->addProperty($budget->id); $cache->addProperty($budget->id);
$cache->addProperty($this->convertToNative); $cache->addProperty($this->convertToNative);
@@ -293,7 +293,7 @@ class BudgetController extends Controller
$cache->addProperty('chart.budget.expense-category'); $cache->addProperty('chart.budget.expense-category');
$start = session('first', today(config('app.timezone'))->startOfYear()); $start = session('first', today(config('app.timezone'))->startOfYear());
$end = today(); $end = today();
if (null !== $budgetLimit) { if ($budgetLimit instanceof BudgetLimit) {
$start = $budgetLimit->start_date; $start = $budgetLimit->start_date;
$end = $budgetLimit->end_date; $end = $budgetLimit->end_date;
$collector->setNormalCurrency($budgetLimit->transactionCurrency); $collector->setNormalCurrency($budgetLimit->transactionCurrency);
@@ -367,7 +367,7 @@ class BudgetController extends Controller
{ {
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
$budgetLimitId = null === $budgetLimit ? 0 : $budgetLimit->id; $budgetLimitId = $budgetLimit instanceof BudgetLimit ? $budgetLimit->id : 0;
$cache = new CacheProperties(); $cache = new CacheProperties();
$cache->addProperty($budget->id); $cache->addProperty($budget->id);
$cache->addProperty($budgetLimitId); $cache->addProperty($budgetLimitId);
@@ -375,7 +375,7 @@ class BudgetController extends Controller
$cache->addProperty('chart.budget.expense-expense'); $cache->addProperty('chart.budget.expense-expense');
$start = session('first', today(config('app.timezone'))->startOfYear()); $start = session('first', today(config('app.timezone'))->startOfYear());
$end = today(); $end = today();
if (null !== $budgetLimit) { if ($budgetLimit instanceof BudgetLimit) {
$start = $budgetLimit->start_date; $start = $budgetLimit->start_date;
$end = $budgetLimit->end_date; $end = $budgetLimit->end_date;
$collector->setRange($budgetLimit->start_date, $budgetLimit->end_date)->setNormalCurrency($budgetLimit->transactionCurrency); $collector->setRange($budgetLimit->start_date, $budgetLimit->end_date)->setNormalCurrency($budgetLimit->transactionCurrency);
@@ -529,7 +529,7 @@ class BudgetController extends Controller
// get budget limit in this period for this currency. // get budget limit in this period for this currency.
$limit = $this->blRepository->find($budget, $currency, $currentStart, $currentEnd); $limit = $this->blRepository->find($budget, $currency, $currentStart, $currentEnd);
if (null !== $limit) { if ($limit instanceof BudgetLimit) {
$chartData[1]['entries'][$title] = app('steam')->bcround($limit->amount, $currency->decimal_places); $chartData[1]['entries'][$title] = app('steam')->bcround($limit->amount, $currency->decimal_places);
} }

View File

@@ -159,7 +159,7 @@ class CategoryController extends Controller
$income = []; $income = [];
$expenses = []; $expenses = [];
$categoryId = 0; $categoryId = 0;
if (null === $category) { if (!$category instanceof Category) {
/** @var NoCategoryRepositoryInterface $noCatRepository */ /** @var NoCategoryRepositoryInterface $noCatRepository */
$noCatRepository = app(NoCategoryRepositoryInterface::class); $noCatRepository = app(NoCategoryRepositoryInterface::class);
@@ -168,7 +168,7 @@ class CategoryController extends Controller
$income = $noCatRepository->listIncome($start, $end, $accounts); $income = $noCatRepository->listIncome($start, $end, $accounts);
} }
if (null !== $category) { if ($category instanceof Category) {
/** @var OperationsRepositoryInterface $opsRepository */ /** @var OperationsRepositoryInterface $opsRepository */
$opsRepository = app(OperationsRepositoryInterface::class); $opsRepository = app(OperationsRepositoryInterface::class);
$categoryId = $category->id; $categoryId = $category->id;

View File

@@ -23,6 +23,8 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use function Safe\realpath;
use function Safe\ini_get;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Support\Facades\Amount; use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\Steam; use FireflyIII\Support\Facades\Steam;
@@ -34,7 +36,7 @@ use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController; use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\View;
use Route; use Illuminate\Support\Facades\Route;
/** /**
* Class Controller. * Class Controller.
@@ -83,15 +85,15 @@ abstract class Controller extends BaseController
if ('true' === request()->get('force_default_layout') && 'v2' === config('view.layout')) { if ('true' === request()->get('force_default_layout') && 'v2' === config('view.layout')) {
//config('view.layout','v1'); //config('view.layout','v1');
Config::set('view.layout', 'v1'); Config::set('view.layout', 'v1');
View::getFinder()->setPaths([\Safe\realpath(base_path('resources/views'))]); // @phpstan-ignore-line View::getFinder()->setPaths([realpath(base_path('resources/views'))]); // @phpstan-ignore-line
} }
View::share('authGuard', $authGuard); View::share('authGuard', $authGuard);
View::share('logoutUrl', $logoutUrl); View::share('logoutUrl', $logoutUrl);
// upload size // upload size
$maxFileSize = Steam::phpBytes((string) \Safe\ini_get('upload_max_filesize')); $maxFileSize = Steam::phpBytes((string) ini_get('upload_max_filesize'));
$maxPostSize = Steam::phpBytes((string) \Safe\ini_get('post_max_size')); $maxPostSize = Steam::phpBytes((string) ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize); $uploadSize = min($maxFileSize, $maxPostSize);
View::share('uploadSize', $uploadSize); View::share('uploadSize', $uploadSize);

View File

@@ -50,6 +50,9 @@ use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler; use Monolog\Handler\RotatingFileHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use function Safe\file_get_contents;
use function Safe\ini_get;
/** /**
* Class DebugController * Class DebugController
*/ */
@@ -139,7 +142,7 @@ class DebugController extends Controller
if ($handler instanceof RotatingFileHandler) { if ($handler instanceof RotatingFileHandler) {
$logFile = $handler->getUrl(); $logFile = $handler->getUrl();
if (null !== $logFile && file_exists($logFile)) { if (null !== $logFile && file_exists($logFile)) {
$logContent = \Safe\file_get_contents($logFile); $logContent = file_get_contents($logFile);
} }
} }
} }
@@ -164,8 +167,8 @@ class DebugController extends Controller
private function getSystemInformation(): array private function getSystemInformation(): array
{ {
$maxFileSize = Steam::phpBytes((string) \Safe\ini_get('upload_max_filesize')); $maxFileSize = Steam::phpBytes((string) ini_get('upload_max_filesize'));
$maxPostSize = Steam::phpBytes((string) \Safe\ini_get('post_max_size')); $maxPostSize = Steam::phpBytes((string) ini_get('post_max_size'));
$drivers = DB::availableDrivers(); $drivers = DB::availableDrivers();
$currentDriver = DB::getDriverName(); $currentDriver = DB::getDriverName();
@@ -177,8 +180,8 @@ class DebugController extends Controller
'interface' => \PHP_SAPI, 'interface' => \PHP_SAPI,
'bits' => \PHP_INT_SIZE * 8, 'bits' => \PHP_INT_SIZE * 8,
'bcscale' => bcscale(), 'bcscale' => bcscale(),
'display_errors' => \Safe\ini_get('display_errors'), 'display_errors' => ini_get('display_errors'),
'error_reporting' => $this->errorReporting((int) \Safe\ini_get('error_reporting')), 'error_reporting' => $this->errorReporting((int) ini_get('error_reporting')),
'upload_size' => min($maxFileSize, $maxPostSize), 'upload_size' => min($maxFileSize, $maxPostSize),
'all_drivers' => $drivers, 'all_drivers' => $drivers,
'current_driver' => $currentDriver, 'current_driver' => $currentDriver,
@@ -197,7 +200,7 @@ class DebugController extends Controller
try { try {
if (file_exists('/var/www/counter-main.txt')) { if (file_exists('/var/www/counter-main.txt')) {
$return['build'] = trim((string) \Safe\file_get_contents('/var/www/counter-main.txt')); $return['build'] = trim((string) file_get_contents('/var/www/counter-main.txt'));
app('log')->debug(sprintf('build is now "%s"', $return['build'])); app('log')->debug(sprintf('build is now "%s"', $return['build']));
} }
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -207,7 +210,7 @@ class DebugController extends Controller
try { try {
if (file_exists('/var/www/build-date-main.txt')) { if (file_exists('/var/www/build-date-main.txt')) {
$return['build_date'] = trim((string) \Safe\file_get_contents('/var/www/build-date-main.txt')); $return['build_date'] = trim((string) file_get_contents('/var/www/build-date-main.txt'));
} }
} catch (\Exception $e) { } catch (\Exception $e) {
app('log')->debug('Could not check build date, but thats ok.'); app('log')->debug('Could not check build date, but thats ok.');

View File

@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Export; namespace FireflyIII\Http\Controllers\Export;
use Carbon\Carbon;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
@@ -84,14 +86,14 @@ class IndexController extends Controller
$firstDate = today(config('app.timezone')); $firstDate = today(config('app.timezone'));
$firstDate->subYear(); $firstDate->subYear();
$journal = $this->journalRepository->firstNull(); $journal = $this->journalRepository->firstNull();
if (null !== $journal) { if ($journal instanceof TransactionJournal) {
Log::debug('First journal is NULL, using today() - 1 year.'); Log::debug('First journal is NULL, using today() - 1 year.');
$firstDate = clone $journal->date; $firstDate = clone $journal->date;
} }
$generator->setStart($firstDate); $generator->setStart($firstDate);
$result = $generator->export(); $result = $generator->export();
$name = sprintf('%s_transaction_export.csv', date('Y_m_d')); $name = sprintf('%s_transaction_export.csv', Carbon::now()->format('Y_m_d'));
$quoted = sprintf('"%s"', addcslashes($name, '"\\')); $quoted = sprintf('"%s"', addcslashes($name, '"\\'));
// headers for CSV file. // headers for CSV file.

View File

@@ -96,7 +96,7 @@ class JavascriptController extends Controller
{ {
$account = $repository->find((int) $request->get('account')); $account = $repository->find((int) $request->get('account'));
$currency = $this->defaultCurrency; $currency = $this->defaultCurrency;
if (null !== $account) { if ($account instanceof Account) {
$currency = $repository->getAccountCurrency($account) ?? $this->defaultCurrency; $currency = $repository->getAccountCurrency($account) ?? $this->defaultCurrency;
} }
$locale = app('steam')->getLocale(); $locale = app('steam')->getLocale();

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json; namespace FireflyIII\Http\Controllers\Json;
use FireflyIII\Models\AvailableBudget;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
@@ -72,7 +73,7 @@ class BudgetController extends Controller
$available = '0'; $available = '0';
$percentage = '0'; $percentage = '0';
if (null !== $availableBudget) { if ($availableBudget instanceof AvailableBudget) {
$available = $availableBudget->amount; $available = $availableBudget->amount;
if (0 !== bccomp($available, '0')) { if (0 !== bccomp($available, '0')) {
$percentage = bcmul(bcdiv($budgeted, $available), '100'); $percentage = bcmul(bcdiv($budgeted, $available), '100');

View File

@@ -77,7 +77,7 @@ class ReconcileController extends Controller
$amount = '0'; $amount = '0';
$clearedAmount = '0'; $clearedAmount = '0';
if (null === $start && null === $end) { if (!$start instanceof Carbon && !$end instanceof Carbon) {
throw new FireflyException('Invalid dates submitted.'); throw new FireflyException('Invalid dates submitted.');
} }
if ($end->lt($start)) { if ($end->lt($start)) {
@@ -183,7 +183,7 @@ class ReconcileController extends Controller
*/ */
public function transactions(Account $account, ?Carbon $start = null, ?Carbon $end = null) public function transactions(Account $account, ?Carbon $start = null, ?Carbon $end = null)
{ {
if (null === $start || null === $end) { if (!$start instanceof Carbon || !$end instanceof Carbon) {
throw new FireflyException('Invalid dates submitted.'); throw new FireflyException('Invalid dates submitted.');
} }
if ($end->lt($start)) { if ($end->lt($start)) {

View File

@@ -82,12 +82,12 @@ class RecurrenceController extends Controller
$skip = $skip < 0 || $skip > 31 ? 0 : $skip; $skip = $skip < 0 || $skip > 31 ? 0 : $skip;
$weekend = $weekend < 1 || $weekend > 4 ? 1 : $weekend; $weekend = $weekend < 1 || $weekend > 4 ? 1 : $weekend;
if (null === $endDate) { if (!$endDate instanceof Carbon) {
// safety catch: // safety catch:
$endDate = now()->addYear(); $endDate = now()->addYear();
} }
if (null === $start || null === $end || null === $firstDate) { if (!$start instanceof Carbon || !$end instanceof Carbon || !$firstDate instanceof Carbon) {
return response()->json(); return response()->json();
} }
@@ -153,7 +153,7 @@ class RecurrenceController extends Controller
*/ */
public function suggest(Request $request): JsonResponse public function suggest(Request $request): JsonResponse
{ {
$string = '' === (string) $request->get('date') ? date('Y-m-d') : (string) $request->get('date'); $string = '' === (string) $request->get('date') ? Carbon::now()->format('Y-m-d') : (string) $request->get('date');
$today = today(config('app.timezone'))->startOfDay(); $today = today(config('app.timezone'))->startOfDay();
try { try {
@@ -161,7 +161,7 @@ class RecurrenceController extends Controller
} catch (InvalidFormatException) { } catch (InvalidFormatException) {
$date = Carbon::today(config('app.timezone')); $date = Carbon::today(config('app.timezone'));
} }
if (null === $date) { if (!$date instanceof Carbon) {
return response()->json(); return response()->json();
} }
$date->startOfDay(); $date->startOfDay();

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Requests\NewUserFormRequest; use FireflyIII\Http\Requests\NewUserFormRequest;
@@ -101,7 +102,7 @@ class NewUserController extends Controller
$currency = $currencyRepository->find((int) $request->input('amount_currency_id_bank_balance')); $currency = $currencyRepository->find((int) $request->input('amount_currency_id_bank_balance'));
// if is null, set to EUR: // if is null, set to EUR:
if (null === $currency) { if (!$currency instanceof TransactionCurrency) {
$currency = $currencyRepository->findByCode('EUR'); $currency = $currencyRepository->findByCode('EUR');
} }
$currencyRepository->enable($currency); $currencyRepository->enable($currency);

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use Carbon\Carbon;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Events\Preferences\UserGroupChangedDefaultCurrency; use FireflyIII\Events\Preferences\UserGroupChangedDefaultCurrency;
use FireflyIII\Events\Test\UserTestNotificationChannel; use FireflyIII\Events\Test\UserTestNotificationChannel;
@@ -40,6 +41,10 @@ use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use function Safe\json_decode;
use function Safe\file_get_contents;
use function Safe\strtotime;
/** /**
* Class PreferencesController. * Class PreferencesController.
*/ */
@@ -110,7 +115,7 @@ class PreferencesController extends Controller
if (is_array($fiscalYearStartStr)) { if (is_array($fiscalYearStartStr)) {
$fiscalYearStartStr = '01-01'; $fiscalYearStartStr = '01-01';
} }
$fiscalYearStart = sprintf('%s-%s', date('Y'), (string) $fiscalYearStartStr); $fiscalYearStart = sprintf('%s-%s', Carbon::now()->format('Y'), (string) $fiscalYearStartStr);
$tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data; $tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data;
$availableDarkModes = config('firefly.available_dark_modes'); $availableDarkModes = config('firefly.available_dark_modes');
@@ -149,7 +154,7 @@ class PreferencesController extends Controller
// list of locales also has "equal" which makes it equal to whatever the language is. // list of locales also has "equal" which makes it equal to whatever the language is.
try { try {
$locales = \Safe\json_decode((string) \Safe\file_get_contents(resource_path(sprintf('locales/%s/locales.json', $language))), true, 512, JSON_THROW_ON_ERROR); $locales = json_decode((string) file_get_contents(resource_path(sprintf('locales/%s/locales.json', $language))), true, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) { } catch (\JsonException $e) {
app('log')->error($e->getMessage()); app('log')->error($e->getMessage());
$locales = []; $locales = [];
@@ -271,9 +276,9 @@ class PreferencesController extends Controller
// custom fiscal year // custom fiscal year
$customFiscalYear = 1 === (int) $request->get('customFiscalYear'); $customFiscalYear = 1 === (int) $request->get('customFiscalYear');
$string = \Safe\strtotime((string) $request->get('fiscalYearStart')); $string = strtotime((string) $request->get('fiscalYearStart'));
if (false !== $string) { if (false !== $string) {
$fiscalYearStart = date('m-d', $string); $fiscalYearStart = Carbon::createFromTimestamp($string)->format('m-d');
Preferences::set('customFiscalYear', $customFiscalYear); Preferences::set('customFiscalYear', $customFiscalYear);
Preferences::set('fiscalYearStart', $fiscalYearStart); Preferences::set('fiscalYearStart', $fiscalYearStart);
} }

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Profile; namespace FireflyIII\Http\Controllers\Profile;
use Illuminate\Support\Facades\Cookie;
use PragmaRX\Google2FALaravel\Facade as Google2FA;
use Carbon\Carbon;
use FireflyIII\Events\Security\DisabledMFA; use FireflyIII\Events\Security\DisabledMFA;
use FireflyIII\Events\Security\EnabledMFA; use FireflyIII\Events\Security\EnabledMFA;
use FireflyIII\Events\Security\MFANewBackupCodes; use FireflyIII\Events\Security\MFANewBackupCodes;
@@ -181,7 +184,7 @@ class MfaController extends Controller
// also logout current 2FA tokens. // also logout current 2FA tokens.
$cookieName = config('google2fa.cookie_name', 'google2fa_token'); $cookieName = config('google2fa.cookie_name', 'google2fa_token');
\Cookie::forget($cookieName); Cookie::forget($cookieName);
// send user notification. // send user notification.
Log::channel('audit')->info(sprintf('User "%s" has disabled MFA', $user->email)); Log::channel('audit')->info(sprintf('User "%s" has disabled MFA', $user->email));
@@ -214,8 +217,8 @@ class MfaController extends Controller
} }
$domain = $this->getDomain(); $domain = $this->getDomain();
$secret = \Google2FA::generateSecretKey(); $secret = Google2FA::generateSecretKey();
$image = \Google2FA::getQRCodeInline($domain, auth()->user()->email, $secret); $image = Google2FA::getQRCodeInline($domain, auth()->user()->email, $secret);
app('preferences')->set('temp-mfa-secret', $secret); app('preferences')->set('temp-mfa-secret', $secret);
@@ -271,7 +274,7 @@ class MfaController extends Controller
// make sure MFA is logged out. // make sure MFA is logged out.
if ('testing' !== config('app.env')) { if ('testing' !== config('app.env')) {
\Google2FA::logout(); Google2FA::logout();
} }
// drop all info from session: // drop all info from session:
@@ -294,7 +297,7 @@ class MfaController extends Controller
/** @var array $mfaHistory */ /** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data; $mfaHistory = app('preferences')->get('mfa_history', [])->data;
$entry = [ $entry = [
'time' => time(), 'time' => Carbon::now()->getTimestamp(),
'code' => $mfaCode, 'code' => $mfaCode,
]; ];
$mfaHistory[] = $entry; $mfaHistory[] = $entry;
@@ -311,7 +314,7 @@ class MfaController extends Controller
/** @var array $mfaHistory */ /** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data; $mfaHistory = app('preferences')->get('mfa_history', [])->data;
$newHistory = []; $newHistory = [];
$now = time(); $now = Carbon::now()->getTimestamp();
foreach ($mfaHistory as $entry) { foreach ($mfaHistory as $entry) {
$time = $entry['time']; $time = $entry['time'];
$code = $entry['code']; $code = $entry['code'];

View File

@@ -23,6 +23,8 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use FireflyIII\Events\UserChangedEmail; use FireflyIII\Events\UserChangedEmail;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Exceptions\ValidationException; use FireflyIII\Exceptions\ValidationException;
@@ -154,7 +156,8 @@ class ProfileController extends Controller
if (0 === $count) { if (0 === $count) {
/** @var ClientRepository $repository */ /** @var ClientRepository $repository */
$repository = app(ClientRepository::class); $repository = app(ClientRepository::class);
$repository->createPersonalAccessClient(null, config('app.name').' Personal Access Client', 'http://localhost'); $name = sprintf('%s Personal Access Grant Client', config('app.name'));
$repository->createPersonalAccessClient(null, $name, 'http://localhost');
} }
$accessToken = app('preferences')->get('access_token'); $accessToken = app('preferences')->get('access_token');
@@ -201,9 +204,9 @@ class ProfileController extends Controller
return redirect(route('profile.change-email'))->withInput(); return redirect(route('profile.change-email'))->withInput();
} }
$existing = $repository->findByEmail($newEmail); $existing = $repository->findByEmail($newEmail);
if (null !== $existing) { if ($existing instanceof User) {
// force user logout. // force user logout.
\Auth::guard()->logout(); // @phpstan-ignore-line (does not recognize function) Auth::guard()->logout(); // @phpstan-ignore-line (does not recognize function)
$request->session()->invalidate(); $request->session()->invalidate();
session()->flash('success', (string) trans('firefly.email_changed')); session()->flash('success', (string) trans('firefly.email_changed'));
@@ -217,7 +220,7 @@ class ProfileController extends Controller
event(new UserChangedEmail($user, $newEmail, $oldEmail)); event(new UserChangedEmail($user, $newEmail, $oldEmail));
// force user logout. // force user logout.
\Auth::guard()->logout(); // @phpstan-ignore-line (does not recognize function) Auth::guard()->logout(); // @phpstan-ignore-line (does not recognize function)
$request->session()->invalidate(); $request->session()->invalidate();
session()->flash('success', (string) trans('firefly.email_changed')); session()->flash('success', (string) trans('firefly.email_changed'));
@@ -310,7 +313,7 @@ class ProfileController extends Controller
return redirect(route('profile.index')); return redirect(route('profile.index'));
} }
if (!\Hash::check($request->get('password'), auth()->user()->password)) { if (!Hash::check($request->get('password'), auth()->user()->password)) {
session()->flash('error', (string) trans('firefly.invalid_password')); session()->flash('error', (string) trans('firefly.invalid_password'));
return redirect(route('profile.delete-account')); return redirect(route('profile.delete-account'));
@@ -343,8 +346,8 @@ class ProfileController extends Controller
'email' => auth()->user()->email, 'email' => auth()->user()->email,
'password' => $request->get('password'), 'password' => $request->get('password'),
]; ];
if (\Auth::once($creds)) { if (Auth::once($creds)) {
\Auth::logoutOtherDevices($request->get('password')); Auth::logoutOtherDevices($request->get('password'));
session()->flash('info', (string) trans('firefly.other_sessions_logged_out')); session()->flash('info', (string) trans('firefly.other_sessions_logged_out'));
return redirect(route('profile.index')); return redirect(route('profile.index'));

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Rule; namespace FireflyIII\Http\Controllers\Rule;
use FireflyIII\Models\Rule;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\RuleFormRequest; use FireflyIII\Http\Requests\RuleFormRequest;
@@ -128,7 +129,7 @@ class CreateController extends Controller
// title depends on whether or not there is a rule group: // title depends on whether or not there is a rule group:
$subTitle = (string) trans('firefly.make_new_rule_no_group'); $subTitle = (string) trans('firefly.make_new_rule_no_group');
if (null !== $ruleGroup) { if ($ruleGroup instanceof RuleGroup) {
$subTitle = (string) trans('firefly.make_new_rule', ['title' => $ruleGroup->title]); $subTitle = (string) trans('firefly.make_new_rule', ['title' => $ruleGroup->title]);
} }
@@ -252,7 +253,7 @@ class CreateController extends Controller
{ {
$ruleId = (int) $request->get('id'); $ruleId = (int) $request->get('id');
$rule = $this->ruleRepos->find($ruleId); $rule = $this->ruleRepos->find($ruleId);
if (null !== $rule) { if ($rule instanceof Rule) {
$this->ruleRepos->duplicate($rule); $this->ruleRepos->duplicate($rule);
} }

View File

@@ -91,7 +91,7 @@ class EditController extends Controller
{ {
$groupId = (int) $request->get('id'); $groupId = (int) $request->get('id');
$ruleGroup = $this->repository->find($groupId); $ruleGroup = $this->repository->find($groupId);
if (null !== $ruleGroup) { if ($ruleGroup instanceof RuleGroup) {
$direction = $request->get('direction'); $direction = $request->get('direction');
if ('down' === $direction) { if ('down' === $direction) {
$maxOrder = $this->repository->maxOrder(); $maxOrder = $this->repository->maxOrder();

View File

@@ -24,7 +24,8 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\System; namespace FireflyIII\Http\Controllers\System;
use Cache; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Exception; use Exception;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
@@ -36,6 +37,8 @@ use Illuminate\View\View;
use Laravel\Passport\Passport; use Laravel\Passport\Passport;
use phpseclib3\Crypt\RSA; use phpseclib3\Crypt\RSA;
use function Safe\file_put_contents;
/** /**
* Class InstallController * Class InstallController
*/ */
@@ -140,14 +143,14 @@ class InstallController extends Controller
$this->keys(); $this->keys();
} }
if ('generate-keys' !== $command) { if ('generate-keys' !== $command) {
\Artisan::call($command, $args); Artisan::call($command, $args);
app('log')->debug(\Artisan::output()); app('log')->debug(Artisan::output());
} }
} catch (\Exception $e) { // intentional generic exception } catch (\Exception $e) { // intentional generic exception
throw new FireflyException($e->getMessage(), 0, $e); throw new FireflyException($e->getMessage(), 0, $e);
} }
// clear cache as well. // clear cache as well.
\Cache::clear(); Cache::clear();
app('preferences')->mark(); app('preferences')->mark();
return true; return true;
@@ -169,7 +172,7 @@ class InstallController extends Controller
return; return;
} }
\Safe\file_put_contents($publicKey, (string) $key->getPublicKey()); file_put_contents($publicKey, (string) $key->getPublicKey());
\Safe\file_put_contents($privateKey, $key->toString('PKCS1')); file_put_contents($privateKey, $key->toString('PKCS1'));
} }
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use FireflyIII\Models\Location;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
@@ -124,10 +125,10 @@ class TagController extends Controller
$subTitleIcon = 'fa-tag'; $subTitleIcon = 'fa-tag';
$location = $this->repository->getLocation($tag); $location = $this->repository->getLocation($tag);
$latitude = null !== $location ? $location->latitude : config('firefly.default_location.latitude'); $latitude = $location instanceof Location ? $location->latitude : config('firefly.default_location.latitude');
$longitude = null !== $location ? $location->longitude : config('firefly.default_location.longitude'); $longitude = $location instanceof Location ? $location->longitude : config('firefly.default_location.longitude');
$zoomLevel = null !== $location ? $location->zoom_level : config('firefly.default_location.zoom_level'); $zoomLevel = $location instanceof Location ? $location->zoom_level : config('firefly.default_location.zoom_level');
$hasLocation = null !== $location; $hasLocation = $location instanceof Location;
$locations = [ $locations = [
'location' => [ 'location' => [
'latitude' => old('location_latitude') ?? $latitude, 'latitude' => old('location_latitude') ?? $latitude,
@@ -155,8 +156,8 @@ class TagController extends Controller
{ {
// start with oldest tag // start with oldest tag
$first = session('first', today()) ?? today(); $first = session('first', today()) ?? today();
$oldestTagDate = null === $repository->oldestTag() ? clone $first : $repository->oldestTag()->date; $oldestTagDate = $repository->oldestTag() instanceof Tag ? $repository->oldestTag()->date : clone $first;
$newestTagDate = null === $repository->newestTag() ? today() : $repository->newestTag()->date; $newestTagDate = $repository->newestTag() instanceof Tag ? $repository->newestTag()->date : today();
$oldestTagDate->startOfYear(); $oldestTagDate->startOfYear();
$newestTagDate->endOfYear(); $newestTagDate->endOfYear();
$tags = []; $tags = [];
@@ -184,7 +185,7 @@ class TagController extends Controller
foreach ($tags as $tagId) { foreach ($tags as $tagId) {
$tagId = (int) $tagId; $tagId = (int) $tagId;
$tag = $this->repository->find($tagId); $tag = $this->repository->find($tagId);
if (null !== $tag) { if ($tag instanceof Tag) {
$this->repository->destroy($tag); $this->repository->destroy($tag);
++$count; ++$count;
} }

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction; namespace FireflyIII\Http\Controllers\Transaction;
use FireflyIII\Models\TransactionCurrency;
use Exception; use Exception;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Enums\TransactionTypeEnum; use FireflyIII\Enums\TransactionTypeEnum;
@@ -342,7 +343,7 @@ class ConvertController extends Controller
$sourceCurrency = $this->accountRepository->getAccountCurrency($source); $sourceCurrency = $this->accountRepository->getAccountCurrency($source);
$dest = $this->accountRepository->find((int) $destinationId); $dest = $this->accountRepository->find((int) $destinationId);
$destCurrency = $this->accountRepository->getAccountCurrency($dest); $destCurrency = $this->accountRepository->getAccountCurrency($dest);
if (null !== $sourceCurrency && null !== $destCurrency && $sourceCurrency->code !== $destCurrency->code) { if ($sourceCurrency instanceof TransactionCurrency && $destCurrency instanceof TransactionCurrency && $sourceCurrency->code !== $destCurrency->code) {
$update['currency_id'] = $sourceCurrency->id; $update['currency_id'] = $sourceCurrency->id;
$update['foreign_currency_id'] = $destCurrency->id; $update['foreign_currency_id'] = $destCurrency->id;
$update['foreign_amount'] = '1'; // not the best solution but at this point the amount is hard to get. $update['foreign_amount'] = '1'; // not the best solution but at this point the amount is hard to get.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction; namespace FireflyIII\Http\Controllers\Transaction;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\Events\StoredTransactionGroup; use FireflyIII\Events\StoredTransactionGroup;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
@@ -35,6 +36,8 @@ use Illuminate\Contracts\View\View;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use function Safe\parse_url;
/** /**
* Class CreateController * Class CreateController
*/ */
@@ -65,7 +68,7 @@ class CreateController extends Controller
$groupId = (int) $request->get('id'); $groupId = (int) $request->get('id');
if (0 !== $groupId) { if (0 !== $groupId) {
$group = $this->repository->find($groupId); $group = $this->repository->find($groupId);
if (null !== $group) { if ($group instanceof TransactionGroup) {
/** @var GroupCloneService $service */ /** @var GroupCloneService $service */
$service = app(GroupCloneService::class); $service = app(GroupCloneService::class);
$newGroup = $service->cloneGroup($group); $newGroup = $service->cloneGroup($group);
@@ -116,7 +119,7 @@ class CreateController extends Controller
$accountToTypes = config('firefly.account_to_transaction'); $accountToTypes = config('firefly.account_to_transaction');
$defaultCurrency = $this->defaultCurrency; $defaultCurrency = $this->defaultCurrency;
$previousUrl = $this->rememberPreviousUrl('transactions.create.url'); $previousUrl = $this->rememberPreviousUrl('transactions.create.url');
$parts = \Safe\parse_url($previousUrl); $parts = parse_url((string) $previousUrl);
$search = sprintf('?%s', $parts['query'] ?? ''); $search = sprintf('?%s', $parts['query'] ?? '');
$previousUrl = str_replace($search, '', $previousUrl); $previousUrl = str_replace($search, '', $previousUrl);
if (!is_array($optionalFields)) { if (!is_array($optionalFields)) {

View File

@@ -35,6 +35,8 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Routing\Redirector; use Illuminate\Routing\Redirector;
use Illuminate\View\View; use Illuminate\View\View;
use function Safe\parse_url;
/** /**
* Class EditController * Class EditController
*/ */
@@ -85,7 +87,7 @@ class EditController extends Controller
$defaultCurrency = $this->defaultCurrency; $defaultCurrency = $this->defaultCurrency;
$cash = $repository->getCashAccount(); $cash = $repository->getCashAccount();
$previousUrl = $this->rememberPreviousUrl('transactions.edit.url'); $previousUrl = $this->rememberPreviousUrl('transactions.edit.url');
$parts = \Safe\parse_url($previousUrl); $parts = parse_url((string) $previousUrl);
$search = sprintf('?%s', $parts['query'] ?? ''); $search = sprintf('?%s', $parts['query'] ?? '');
$previousUrl = str_replace($search, '', $previousUrl); $previousUrl = str_replace($search, '', $previousUrl);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction; namespace FireflyIII\Http\Controllers\Transaction;
use FireflyIII\Models\TransactionJournal;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
@@ -81,14 +82,14 @@ class IndexController extends Controller
$page = (int) $request->get('page'); $page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
if (null === $start) { if (!$start instanceof Carbon) {
$start = session('start'); $start = session('start');
$end = session('end'); $end = session('end');
} }
if (null === $end) { if (null === $end) {
// get last transaction ever? // get last transaction ever?
$last = $this->repository->getLast(); $last = $this->repository->getLast();
$end = null !== $last ? $last->date : session('end'); $end = $last instanceof TransactionJournal ? $last->date : session('end');
} }
[$start, $end] = $end < $start ? [$end, $start] : [$start, $end]; [$start, $end] = $end < $start ? [$end, $start] : [$start, $end];
@@ -97,7 +98,7 @@ class IndexController extends Controller
$subTitle = (string) trans(sprintf('firefly.title_%s_between', $objectType), ['start' => $startStr, 'end' => $endStr]); $subTitle = (string) trans(sprintf('firefly.title_%s_between', $objectType), ['start' => $startStr, 'end' => $endStr]);
$path = route('transactions.index', [$objectType, $start->format('Y-m-d'), $end->format('Y-m-d')]); $path = route('transactions.index', [$objectType, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$firstJournal = $this->repository->firstNull(); $firstJournal = $this->repository->firstNull();
$startPeriod = null === $firstJournal ? new Carbon() : $firstJournal->date; $startPeriod = $firstJournal instanceof TransactionJournal ? $firstJournal->date : new Carbon();
$endPeriod = clone $end; $endPeriod = clone $end;
$periods = $this->getTransactionPeriodOverview($objectType, $startPeriod, $endPeriod); $periods = $this->getTransactionPeriodOverview($objectType, $startPeriod, $endPeriod);
@@ -132,9 +133,9 @@ class IndexController extends Controller
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data; $pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
$path = route('transactions.index.all', [$objectType]); $path = route('transactions.index.all', [$objectType]);
$first = $this->repository->firstNull(); $first = $this->repository->firstNull();
$start = null === $first ? new Carbon() : $first->date; $start = $first instanceof TransactionJournal ? $first->date : new Carbon();
$last = $this->repository->getLast(); $last = $this->repository->getLast();
$end = null !== $last ? $last->date : today(config('app.timezone')); $end = $last instanceof TransactionJournal ? $last->date : today(config('app.timezone'));
$subTitle = (string) trans('firefly.all_'.$objectType); $subTitle = (string) trans('firefly.all_'.$objectType);
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */

View File

@@ -113,7 +113,7 @@ class LinkController extends Controller
app('log')->debug('We are here (store)'); app('log')->debug('We are here (store)');
$other = $this->journalRepository->find($linkInfo['transaction_journal_id']); $other = $this->journalRepository->find($linkInfo['transaction_journal_id']);
if (null === $other) { if (!$other instanceof TransactionJournal) {
session()->flash('error', (string) trans('firefly.invalid_link_selection')); session()->flash('error', (string) trans('firefly.invalid_link_selection'));
return redirect(route('transactions.show', [$journal->transaction_group_id])); return redirect(route('transactions.show', [$journal->transaction_group_id]));

View File

@@ -191,7 +191,7 @@ class MassController extends Controller
private function updateJournal(int $journalId, MassEditJournalRequest $request): void private function updateJournal(int $journalId, MassEditJournalRequest $request): void
{ {
$journal = $this->repository->find($journalId); $journal = $this->repository->find($journalId);
if (null === $journal) { if (!$journal instanceof TransactionJournal) {
throw new FireflyException(sprintf('Trying to edit non-existent or deleted journal #%d', $journalId)); throw new FireflyException(sprintf('Trying to edit non-existent or deleted journal #%d', $journalId));
} }
$service = app(JournalUpdateService::class); $service = app(JournalUpdateService::class);

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\TransactionCurrency; namespace FireflyIII\Http\Controllers\TransactionCurrency;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\CurrencyFormRequest; use FireflyIII\Http\Requests\CurrencyFormRequest;
@@ -122,7 +123,7 @@ class CreateController extends Controller
} }
$redirect = redirect($this->getPreviousUrl('currencies.create.url')); $redirect = redirect($this->getPreviousUrl('currencies.create.url'));
if (null !== $currency) { if ($currency instanceof TransactionCurrency) {
$request->session()->flash('success', (string) trans('firefly.created_currency', ['name' => $currency->name])); $request->session()->flash('success', (string) trans('firefly.created_currency', ['name' => $currency->name]));
Log::channel('audit')->info('Created (POST) currency.', $data); Log::channel('audit')->info('Created (POST) currency.', $data);
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {

View File

@@ -29,6 +29,8 @@ use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use function Safe\preg_match;
class AcceptHeaders class AcceptHeaders
{ {
/** /**
@@ -71,7 +73,7 @@ class AcceptHeaders
// throw bad request if trace id is not a UUID // throw bad request if trace id is not a UUID
$uuid = $request->header('X-Trace-Id'); $uuid = $request->header('X-Trace-Id');
if (is_string($uuid) && '' !== trim($uuid) && (1 !== \Safe\preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) { if (is_string($uuid) && '' !== trim($uuid) && (1 !== preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) {
throw new BadRequestHttpException('Bad X-Trace-Id header.'); throw new BadRequestHttpException('Bad X-Trace-Id header.');
} }

View File

@@ -114,10 +114,10 @@ class Authenticate
*/ */
private function validateBlockedUser(?User $user, array $guards): void private function validateBlockedUser(?User $user, array $guards): void
{ {
if (null === $user) { if (!$user instanceof User) {
app('log')->warning('User is null, throw exception?'); app('log')->warning('User is null, throw exception?');
} }
if (null !== $user) { if ($user instanceof User) {
// app('log')->debug(get_class($user)); // app('log')->debug(get_class($user));
if (1 === (int) $user->blocked) { if (1 === (int) $user->blocked) {
$message = (string) trans('firefly.block_account_logout'); $message = (string) trans('firefly.block_account_logout');

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Middleware; namespace FireflyIII\Http\Middleware;
use Illuminate\Support\Facades\App;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use FireflyIII\Support\Facades\Amount; use FireflyIII\Support\Facades\Amount;
@@ -101,7 +102,7 @@ class Range
// get locale preference: // get locale preference:
$language = app('steam')->getLanguage(); $language = app('steam')->getLanguage();
$locale = app('steam')->getLocale(); $locale = app('steam')->getLocale();
\App::setLocale($language); App::setLocale($language);
Carbon::setLocale(substr((string) $locale, 0, 2)); Carbon::setLocale(substr((string) $locale, 0, 2));
$localeArray = app('steam')->getLocaleArray($locale); $localeArray = app('steam')->getLocaleArray($locale);

View File

@@ -70,7 +70,7 @@ class CurrencyFormRequest extends FormRequest
$currency = $this->route()->parameter('currency'); $currency = $this->route()->parameter('currency');
if (null !== $currency) { if (null !== $currency) {
$rules = [ return [
'name' => 'required|max:48|min:1', 'name' => 'required|max:48|min:1',
'code' => 'required|min:3|max:51', 'code' => 'required|min:3|max:51',
'symbol' => 'required|min:1|max:51', 'symbol' => 'required|min:1|max:51',

View File

@@ -36,6 +36,8 @@ use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Validator; use Illuminate\Validation\Validator;
use function Safe\preg_match;
/** /**
* Class CategoryFormRequest. * Class CategoryFormRequest.
*/ */
@@ -143,7 +145,7 @@ class ReportFormRequest extends FormRequest
// validate as date // validate as date
// if regex for YYYY-MM-DD: // if regex for YYYY-MM-DD:
$pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][\d]|3[01])$/'; $pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][\d]|3[01])$/';
$result = \Safe\preg_match($pattern, $string); $result = preg_match($pattern, $string);
if (false !== $result && 0 !== $result) { if (false !== $result && 0 !== $result) {
try { try {
$date = new Carbon($parts[1]); $date = new Carbon($parts[1]);
@@ -181,7 +183,7 @@ class ReportFormRequest extends FormRequest
// validate as date // validate as date
// if regex for YYYY-MM-DD: // if regex for YYYY-MM-DD:
$pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][\d]|3[01])$/'; $pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][\d]|3[01])$/';
$result = \Safe\preg_match($pattern, $string); $result = preg_match($pattern, $string);
if (false !== $result && 0 !== $result) { if (false !== $result && 0 !== $result) {
try { try {
$date = new Carbon($parts[0]); $date = new Carbon($parts[0]);

View File

@@ -28,6 +28,7 @@ use Illuminate\Mail\Message;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Symfony\Component\Mailer\Exception\TransportException; use Symfony\Component\Mailer\Exception\TransportException;
/** /**
@@ -70,7 +71,7 @@ class MailError extends Job implements ShouldQueue
if ($this->attempts() < 3 && '' !== $email) { if ($this->attempts() < 3 && '' !== $email) {
try { try {
\Mail::send( Mail::send(
['emails.error-html', 'emails.error-text'], ['emails.error-html', 'emails.error-text'],
$args, $args,
static function (Message $message) use ($email): void { static function (Message $message) use ($email): void {

View File

@@ -41,6 +41,7 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void public function boot(): void
{ {
Schema::defaultStringLength(191); Schema::defaultStringLength(191);
// Passport::$clientUuids = false;
Response::macro('api', function (array $value) { Response::macro('api', function (array $value) {
$headers = [ $headers = [
'Cache-Control' => 'no-store', 'Cache-Control' => 'no-store',
@@ -58,7 +59,7 @@ class AppServiceProvider extends ServiceProvider
// blade extension // blade extension
Blade::directive('activeXRoutePartial', function (string $route) { Blade::directive('activeXRoutePartial', function (string $route) {
$name = \Route::getCurrentRoute()->getName() ?? ''; $name = Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) { if (str_contains($name, $route)) {
return 'menu-open'; return 'menu-open';
} }

View File

@@ -39,6 +39,7 @@ use FireflyIII\Models\TransactionGroup;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService; use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
use Illuminate\Support\Facades\Validator;
/** /**
* Trait AccountServiceTrait * Trait AccountServiceTrait
@@ -54,7 +55,7 @@ trait AccountServiceTrait
} }
$data = ['iban' => $iban]; $data = ['iban' => $iban];
$rules = ['iban' => 'required|iban']; $rules = ['iban' => 'required|iban'];
$validator = \Validator::make($data, $rules); $validator = Validator::make($data, $rules);
if ($validator->fails()) { if ($validator->fails()) {
app('log')->info(sprintf('Detected invalid IBAN ("%s"). Return NULL instead.', $iban)); app('log')->info(sprintf('Detected invalid IBAN ("%s"). Return NULL instead.', $iban));

View File

@@ -23,7 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Support; namespace FireflyIII\Support;
use Eloquent; use Illuminate\Database\Eloquent\Model;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Support\Form\FormSupport; use FireflyIII\Support\Form\FormSupport;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
@@ -205,7 +205,7 @@ class ExpandedForm
$selectList[0] = '(none)'; $selectList[0] = '(none)';
$fields = ['title', 'name', 'description']; $fields = ['title', 'name', 'description'];
/** @var \Eloquent $entry */ /** @var Model $entry */
foreach ($set as $entry) { foreach ($set as $entry) {
// All Eloquent models have an ID // All Eloquent models have an ID
$entryId = $entry->id; $entryId = $entry->id;

View File

@@ -28,6 +28,7 @@ use FireflyIII\Models\Configuration;
use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Encryption\EncryptException; use Illuminate\Contracts\Encryption\EncryptException;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
/** /**
@@ -38,8 +39,8 @@ class FireflyConfig
public function delete(string $name): void public function delete(string $name): void
{ {
$fullName = 'ff-config-'.$name; $fullName = 'ff-config-'.$name;
if (\Cache::has($fullName)) { if (Cache::has($fullName)) {
\Cache::forget($fullName); Cache::forget($fullName);
} }
Configuration::where('name', $name)->forceDelete(); Configuration::where('name', $name)->forceDelete();
} }
@@ -80,8 +81,8 @@ class FireflyConfig
public function get(string $name, mixed $default = null): ?Configuration public function get(string $name, mixed $default = null): ?Configuration
{ {
$fullName = 'ff-config-'.$name; $fullName = 'ff-config-'.$name;
if (\Cache::has($fullName)) { if (Cache::has($fullName)) {
return \Cache::get($fullName); return Cache::get($fullName);
} }
try { try {
@@ -92,7 +93,7 @@ class FireflyConfig
} }
if (null !== $config) { if (null !== $config) {
\Cache::forever($fullName, $config); Cache::forever($fullName, $config);
return $config; return $config;
} }
@@ -122,13 +123,13 @@ class FireflyConfig
$item->name = $name; $item->name = $name;
$item->data = $value; $item->data = $value;
$item->save(); $item->save();
\Cache::forget('ff-config-'.$name); Cache::forget('ff3-config-'.$name);
return $item; return $item;
} }
$config->data = $value; $config->data = $value;
$config->save(); $config->save();
\Cache::forget('ff-config-'.$name); Cache::forget('ff3-config-'.$name);
return $config; return $config;
} }

View File

@@ -33,7 +33,7 @@ use FireflyIII\User;
use Illuminate\Contracts\Validation\Validator as ValidatorContract; use Illuminate\Contracts\Validation\Validator as ValidatorContract;
use Illuminate\Routing\Route; use Illuminate\Routing\Route;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use Route as RouteFacade; use Illuminate\Support\Facades\Route as RouteFacade;
/** /**
* Trait RequestInformation * Trait RequestInformation

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Support\System;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Crypt; use Illuminate\Support\Facades\Crypt;
use Laravel\Passport\Console\KeysCommand; use Laravel\Passport\Console\KeysCommand;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
@@ -88,8 +89,8 @@ class OAuthKeys
public static function generateKeys(): void public static function generateKeys(): void
{ {
\Artisan::registerCommand(new KeysCommand()); Artisan::registerCommand(new KeysCommand());
\Artisan::call('firefly-iii:laravel-passport-keys'); Artisan::call('firefly-iii:laravel-passport-keys');
} }
public static function storeKeysInDB(): void public static function storeKeysInDB(): void

View File

@@ -33,7 +33,7 @@ use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Search\OperatorQuerySearch; use FireflyIII\Support\Search\OperatorQuerySearch;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\CommonMark\GithubFlavoredMarkdownConverter; use League\CommonMark\GithubFlavoredMarkdownConverter;
use Route; use Illuminate\Support\Facades\Route;
use Twig\Extension\AbstractExtension; use Twig\Extension\AbstractExtension;
use Twig\TwigFilter; use Twig\TwigFilter;
use Twig\TwigFunction; use Twig\TwigFunction;
@@ -247,7 +247,7 @@ class General extends AbstractExtension
static function (): string { static function (): string {
$args = func_get_args(); $args = func_get_args();
$route = $args[0]; // name of the route. $route = $args[0]; // name of the route.
$name = \Route::getCurrentRoute()->getName() ?? ''; $name = Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) { if (str_contains($name, $route)) {
return 'active'; return 'active';
} }
@@ -271,7 +271,7 @@ class General extends AbstractExtension
if ($objectType === $activeObjectType if ($objectType === $activeObjectType
&& false !== stripos( && false !== stripos(
(string) \Route::getCurrentRoute()->getName(), (string) Route::getCurrentRoute()->getName(),
(string) $route (string) $route
)) { )) {
return 'active'; return 'active';
@@ -294,7 +294,7 @@ class General extends AbstractExtension
static function (): string { static function (): string {
$args = func_get_args(); $args = func_get_args();
$route = $args[0]; // name of the route. $route = $args[0]; // name of the route.
$name = \Route::getCurrentRoute()->getName() ?? ''; $name = Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) { if (str_contains($name, $route)) {
return 'menu-open'; return 'menu-open';
} }

View File

@@ -116,6 +116,18 @@ class SetDestinationAccount implements ActionInterface
if (TransactionTypeEnum::WITHDRAWAL->value === $type) { if (TransactionTypeEnum::WITHDRAWAL->value === $type) {
$newAccount = $this->findWithdrawalDestinationAccount($accountName); $newAccount = $this->findWithdrawalDestinationAccount($accountName);
} }
if (null === $newAccount) {
app('log')->error(
sprintf(
'No destination account found for name "%s".',
$accountName
)
);
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.no_destination', ['name' => $accountName])));
return false;
}
app('log')->debug(sprintf('New destination account is #%d ("%s").', $newAccount->id, $newAccount->name)); app('log')->debug(sprintf('New destination account is #%d ("%s").', $newAccount->id, $newAccount->name));

View File

@@ -61,6 +61,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Illuminate\Notifications\Notification; use Illuminate\Notifications\Notification;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Laravel\Passport\HasApiTokens; use Laravel\Passport\HasApiTokens;
use NotificationChannels\Pushover\PushoverReceiver; use NotificationChannels\Pushover\PushoverReceiver;
@@ -464,7 +465,7 @@ class User extends Authenticatable
*/ */
public function sendPasswordResetNotification($token): void public function sendPasswordResetNotification($token): void
{ {
$ipAddress = \Request::ip(); $ipAddress = Request::ip();
event(new RequestedNewPassword($this, $token, $ipAddress)); event(new RequestedNewPassword($this, $token, $ipAddress));
} }

View File

@@ -44,6 +44,7 @@ use Illuminate\Validation\Validator;
use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException;
use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; use PragmaRX\Google2FA\Exceptions\InvalidCharactersException;
use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException; use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException;
use PragmaRX\Google2FALaravel\Facade;
/** /**
* Class FireflyValidator. * Class FireflyValidator.
@@ -79,7 +80,7 @@ class FireflyValidator extends Validator
} }
$secret = (string) $secret; $secret = (string) $secret;
return (bool) \Google2FA::verifyKey($secret, $value); return (bool) Facade::verifyKey($secret, $value);
} }
/** /**
@@ -131,7 +132,7 @@ class FireflyValidator extends Validator
} }
$secret = (string) $user->mfa_secret; $secret = (string) $user->mfa_secret;
return (bool) \Google2FA::verifyKey($secret, $value); return (bool) Facade::verifyKey($secret, $value);
} }
/** /**

View File

@@ -3,6 +3,35 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
## 6.2.15 - 2025-05-26
### Fixed
- Restore missing facades.
## 6.2.14 - 2025-05-26
### Fixed
- [Issue 10356](https://github.com/firefly-iii/firefly-iii/issues/10356) (Call to undefined method createPersonalAccessClient()) reported by @JC5
- [Issue 10357](https://github.com/firefly-iii/firefly-iii/issues/10357) (Target AuthorizationViewResponse is not instantiable) reported by @JC5
## 6.2.13 - 2025-05-25
### Fixed
- [Issue 10114](https://github.com/firefly-iii/firefly-iii/issues/10114) (Budget for foreign currency not getting updated when a transaction refers to it) reported by @srikakulamts
- [Issue 10180](https://github.com/firefly-iii/firefly-iii/issues/10180) (missing SPENT info) reported by @frank-bg
- [Issue 10197](https://github.com/firefly-iii/firefly-iii/issues/10197) (Add rule number) reported by @gogoizzy
- [PR 10203](https://github.com/firefly-iii/firefly-iii/pull/10203) (Fix Ukrainian language names) reported by @den-is
- [Issue 10265](https://github.com/firefly-iii/firefly-iii/issues/10265) (Liabilities, foreign currencies have some issues (payment/exchange with native currency)) reported by @jgmm81
- [Issue 10290](https://github.com/firefly-iii/firefly-iii/issues/10290) (edit multiple transactions individually ignores reconciled state) reported by @goebeler
- [Issue 10302](https://github.com/firefly-iii/firefly-iii/issues/10302) (Attempt to read property "id" on null Error) reported by @XBadPlayerX
- [Issue 10305](https://github.com/firefly-iii/firefly-iii/issues/10305) (The info icon used to display transactions is not clickable in the default financial reports "budgets by accounts"-section's sum column) reported by @goebeler
- [Issue 10308](https://github.com/firefly-iii/firefly-iii/issues/10308) (Liabilities, with some details (payment/exchange with native currency)) reported by @jgmm81
- [Issue 10320](https://github.com/firefly-iii/firefly-iii/issues/10320) (Button to update transaction keeps being disabled after correcting form errors) reported by @Astro1247
- [Issue 10336](https://github.com/firefly-iii/firefly-iii/issues/10336) (New install recovering backup from 5.7.18 fails to run. ($param) must be of type int, string given in orrectsUnevenAmount.php) reported by @perezalvarezhi
## 6.2.12 - 2025-04-21 ## 6.2.12 - 2025-04-21
### Fixed ### Fixed

View File

@@ -89,7 +89,7 @@
"jc5/recovery": "^2", "jc5/recovery": "^2",
"laravel-notification-channels/pushover": "^4.0", "laravel-notification-channels/pushover": "^4.0",
"laravel/framework": "^12", "laravel/framework": "^12",
"laravel/passport": "^13.", "laravel/passport": "^12.0",
"laravel/sanctum": "^4.1", "laravel/sanctum": "^4.1",
"laravel/slack-notification-channel": "^3.3", "laravel/slack-notification-channel": "^3.3",
"laravel/ui": "^4.2", "laravel/ui": "^4.2",

443
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "404a3c73aa12057d75eaf3fb298d9a82", "content-hash": "b630645d62adf0b4c2a9a16ccfc7a3cc",
"packages": [ "packages": [
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@@ -1879,16 +1879,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v12.14.1", "version": "v12.15.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "84b142958d1638a7e89de94ce75c2821c601d3d7" "reference": "2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/84b142958d1638a7e89de94ce75c2821c601d3d7", "url": "https://api.github.com/repos/laravel/framework/zipball/2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77",
"reference": "84b142958d1638a7e89de94ce75c2821c601d3d7", "reference": "2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2090,48 +2090,47 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-05-13T17:50:51+00:00" "time": "2025-05-20T15:10:44+00:00"
}, },
{ {
"name": "laravel/passport", "name": "laravel/passport",
"version": "v13.0.1", "version": "v12.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/passport.git", "url": "https://github.com/laravel/passport.git",
"reference": "d96323a1c3699efe51ca477c3dd8fdd6500d7997" "reference": "65a885607b62d361aedaeb10a946bc6b5a954262"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/passport/zipball/d96323a1c3699efe51ca477c3dd8fdd6500d7997", "url": "https://api.github.com/repos/laravel/passport/zipball/65a885607b62d361aedaeb10a946bc6b5a954262",
"reference": "d96323a1c3699efe51ca477c3dd8fdd6500d7997", "reference": "65a885607b62d361aedaeb10a946bc6b5a954262",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"ext-openssl": "*",
"firebase/php-jwt": "^6.4", "firebase/php-jwt": "^6.4",
"illuminate/auth": "^11.35|^12.0", "illuminate/auth": "^9.21|^10.0|^11.0|^12.0",
"illuminate/console": "^11.35|^12.0", "illuminate/console": "^9.21|^10.0|^11.0|^12.0",
"illuminate/container": "^11.35|^12.0", "illuminate/container": "^9.21|^10.0|^11.0|^12.0",
"illuminate/contracts": "^11.35|^12.0", "illuminate/contracts": "^9.21|^10.0|^11.0|^12.0",
"illuminate/cookie": "^11.35|^12.0", "illuminate/cookie": "^9.21|^10.0|^11.0|^12.0",
"illuminate/database": "^11.35|^12.0", "illuminate/database": "^9.21|^10.0|^11.0|^12.0",
"illuminate/encryption": "^11.35|^12.0", "illuminate/encryption": "^9.21|^10.0|^11.0|^12.0",
"illuminate/http": "^11.35|^12.0", "illuminate/http": "^9.21|^10.0|^11.0|^12.0",
"illuminate/support": "^11.35|^12.0", "illuminate/support": "^9.21|^10.0|^11.0|^12.0",
"league/oauth2-server": "^9.2", "lcobucci/jwt": "^4.3|^5.0",
"php": "^8.2", "league/oauth2-server": "^8.5.3",
"php-http/discovery": "^1.20", "nyholm/psr7": "^1.5",
"phpseclib/phpseclib": "^3.0", "php": "^8.0",
"psr/http-factory-implementation": "*", "phpseclib/phpseclib": "^2.0|^3.0",
"symfony/console": "^7.1", "symfony/console": "^6.0|^7.0",
"symfony/psr-http-message-bridge": "^7.1" "symfony/psr-http-message-bridge": "^2.1|^6.0|^7.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.6", "mockery/mockery": "^1.0",
"orchestra/testbench": "^9.9|^10.0", "orchestra/testbench": "^7.35|^8.14|^9.0|^10.0",
"phpstan/phpstan": "^2.0", "phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^11.5|^12.0" "phpunit/phpunit": "^9.3|^10.5|^11.5"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -2167,7 +2166,7 @@
"issues": "https://github.com/laravel/passport/issues", "issues": "https://github.com/laravel/passport/issues",
"source": "https://github.com/laravel/passport" "source": "https://github.com/laravel/passport"
}, },
"time": "2025-05-07T17:16:06+00:00" "time": "2025-02-12T16:11:33+00:00"
}, },
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
@@ -2900,34 +2899,29 @@
}, },
{ {
"name": "league/event", "name": "league/event",
"version": "3.0.3", "version": "2.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/event.git", "url": "https://github.com/thephpleague/event.git",
"reference": "ec38ff7ea10cad7d99a79ac937fbcffb9334c210" "reference": "062ebb450efbe9a09bc2478e89b7c933875b0935"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/event/zipball/ec38ff7ea10cad7d99a79ac937fbcffb9334c210", "url": "https://api.github.com/repos/thephpleague/event/zipball/062ebb450efbe9a09bc2478e89b7c933875b0935",
"reference": "ec38ff7ea10cad7d99a79ac937fbcffb9334c210", "reference": "062ebb450efbe9a09bc2478e89b7c933875b0935",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.0", "php": ">=7.1.0"
"psr/event-dispatcher": "^1.0"
},
"provide": {
"psr/event-dispatcher-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.16", "henrikbjorn/phpspec-code-coverage": "~1.0.1",
"phpstan/phpstan": "^0.12.45", "phpspec/phpspec": "^2.2"
"phpunit/phpunit": "^8.5"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.0-dev" "dev-master": "2.2-dev"
} }
}, },
"autoload": { "autoload": {
@@ -2953,9 +2947,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/event/issues", "issues": "https://github.com/thephpleague/event/issues",
"source": "https://github.com/thephpleague/event/tree/3.0.3" "source": "https://github.com/thephpleague/event/tree/2.3.0"
}, },
"time": "2024-09-04T16:06:53+00:00" "time": "2025-03-14T19:51:10+00:00"
}, },
{ {
"name": "league/flysystem", "name": "league/flysystem",
@@ -3217,46 +3211,38 @@
}, },
{ {
"name": "league/oauth2-server", "name": "league/oauth2-server",
"version": "9.2.0", "version": "8.5.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/oauth2-server.git", "url": "https://github.com/thephpleague/oauth2-server.git",
"reference": "00323013403e1a1e0f424affafca56c28b60c22c" "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/00323013403e1a1e0f424affafca56c28b60c22c", "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/cc8778350f905667e796b3c2364a9d3bd7a73518",
"reference": "00323013403e1a1e0f424affafca56c28b60c22c", "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"defuse/php-encryption": "^2.4", "defuse/php-encryption": "^2.3",
"ext-json": "*",
"ext-openssl": "*", "ext-openssl": "*",
"lcobucci/clock": "^2.3 || ^3.0", "lcobucci/clock": "^2.2 || ^3.0",
"lcobucci/jwt": "^5.0", "lcobucci/jwt": "^4.3 || ^5.0",
"league/event": "^3.0", "league/event": "^2.2",
"league/uri": "^7.0", "league/uri": "^6.7 || ^7.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "php": "^8.0",
"psr/http-message": "^2.0", "psr/http-message": "^1.0.1 || ^2.0"
"psr/http-server-middleware": "^1.0"
}, },
"replace": { "replace": {
"league/oauth2server": "*", "league/oauth2server": "*",
"lncd/oauth2": "*" "lncd/oauth2": "*"
}, },
"require-dev": { "require-dev": {
"laminas/laminas-diactoros": "^3.5", "laminas/laminas-diactoros": "^3.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2", "phpstan/phpstan": "^0.12.57",
"phpstan/extension-installer": "^1.3.1", "phpstan/phpstan-phpunit": "^0.12.16",
"phpstan/phpstan": "^1.12", "phpunit/phpunit": "^9.6.6",
"phpstan/phpstan-deprecation-rules": "^1.1.4", "roave/security-advisories": "dev-master"
"phpstan/phpstan-phpunit": "^1.3.15",
"phpstan/phpstan-strict-rules": "^1.5.2",
"phpunit/phpunit": "^9.6.21",
"roave/security-advisories": "dev-master",
"slevomat/coding-standard": "^8.14.1",
"squizlabs/php_codesniffer": "^3.8"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -3301,7 +3287,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/oauth2-server/issues", "issues": "https://github.com/thephpleague/oauth2-server/issues",
"source": "https://github.com/thephpleague/oauth2-server/tree/9.2.0" "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.5"
}, },
"funding": [ "funding": [
{ {
@@ -3309,7 +3295,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-02-15T00:49:10+00:00" "time": "2024-12-20T23:06:10+00:00"
}, },
{ {
"name": "league/uri", "name": "league/uri",
@@ -5117,16 +5103,16 @@
}, },
{ {
"name": "predis/predis", "name": "predis/predis",
"version": "v3.0.0", "version": "v3.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/predis/predis.git", "url": "https://github.com/predis/predis.git",
"reference": "7d86f7afb37940bfc7aaa2909147616881377667" "reference": "34fb0a7da0330df1bab4280fcac4afdeeccc3edf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/predis/predis/zipball/7d86f7afb37940bfc7aaa2909147616881377667", "url": "https://api.github.com/repos/predis/predis/zipball/34fb0a7da0330df1bab4280fcac4afdeeccc3edf",
"reference": "7d86f7afb37940bfc7aaa2909147616881377667", "reference": "34fb0a7da0330df1bab4280fcac4afdeeccc3edf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5168,7 +5154,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/predis/predis/issues", "issues": "https://github.com/predis/predis/issues",
"source": "https://github.com/predis/predis/tree/v3.0.0" "source": "https://github.com/predis/predis/tree/v3.0.1"
}, },
"funding": [ "funding": [
{ {
@@ -5176,7 +5162,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-05-02T23:18:59+00:00" "time": "2025-05-16T18:30:32+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@@ -5538,119 +5524,6 @@
}, },
"time": "2023-04-04T09:54:51+00:00" "time": "2023-04-04T09:54:51+00:00"
}, },
{
"name": "psr/http-server-handler",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-server-handler.git",
"reference": "84c4fb66179be4caaf8e97bd239203245302e7d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4",
"reference": "84c4fb66179be4caaf8e97bd239203245302e7d4",
"shasum": ""
},
"require": {
"php": ">=7.0",
"psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Server\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP server-side request handler",
"keywords": [
"handler",
"http",
"http-interop",
"psr",
"psr-15",
"psr-7",
"request",
"response",
"server"
],
"support": {
"source": "https://github.com/php-fig/http-server-handler/tree/1.0.2"
},
"time": "2023-04-10T20:06:20+00:00"
},
{
"name": "psr/http-server-middleware",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-server-middleware.git",
"reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829",
"reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829",
"shasum": ""
},
"require": {
"php": ">=7.0",
"psr/http-message": "^1.0 || ^2.0",
"psr/http-server-handler": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Server\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP server-side middleware",
"keywords": [
"http",
"http-interop",
"middleware",
"psr",
"psr-15",
"psr-7",
"request",
"response"
],
"support": {
"issues": "https://github.com/php-fig/http-server-middleware/issues",
"source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2"
},
"time": "2023-04-11T06:14:47+00:00"
},
{ {
"name": "psr/log", "name": "psr/log",
"version": "3.0.2", "version": "3.0.2",
@@ -6648,16 +6521,16 @@
}, },
{ {
"name": "symfony/cache-contracts", "name": "symfony/cache-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/cache-contracts.git", "url": "https://github.com/symfony/cache-contracts.git",
"reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868",
"reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -6671,7 +6544,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -6704,7 +6577,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" "source": "https://github.com/symfony/cache-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -6720,7 +6593,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2025-03-13T15:25:07+00:00"
}, },
{ {
"name": "symfony/clock", "name": "symfony/clock",
@@ -6956,16 +6829,16 @@
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -6978,7 +6851,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -7003,7 +6876,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.5.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -7019,7 +6892,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
@@ -7178,16 +7051,16 @@
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
"version": "v3.5.1", "version": "v3.6.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": "7642f5e970b672283b7823222ae8ef8bbc160b9f" "reference": "59eb412e93815df44f05f342958efa9f46b1e586"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586",
"reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "reference": "59eb412e93815df44f05f342958efa9f46b1e586",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7201,7 +7074,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -7234,7 +7107,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -7250,7 +7123,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "symfony/expression-language", "name": "symfony/expression-language",
@@ -7477,16 +7350,16 @@
}, },
{ {
"name": "symfony/http-client-contracts", "name": "symfony/http-client-contracts",
"version": "v3.5.2", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-client-contracts.git", "url": "https://github.com/symfony/http-client-contracts.git",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" "reference": "75d7043853a42837e68111812f4d964b01e5101c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", "reference": "75d7043853a42837e68111812f4d964b01e5101c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7499,7 +7372,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -7535,7 +7408,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" "source": "https://github.com/symfony/http-client-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -7551,7 +7424,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-12-07T08:49:48+00:00" "time": "2025-04-29T11:18:49+00:00"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
@@ -8909,16 +8782,16 @@
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/service-contracts.git",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -8936,7 +8809,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -8972,7 +8845,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.5.1" "source": "https://github.com/symfony/service-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -8988,7 +8861,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2025-04-25T09:37:31+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
@@ -9174,16 +9047,16 @@
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation-contracts.git", "url": "https://github.com/symfony/translation-contracts.git",
"reference": "4667ff3bd513750603a09c8dedbea942487fb07c" "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d",
"reference": "4667ff3bd513750603a09c8dedbea942487fb07c", "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9196,7 +9069,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -9232,7 +9105,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -9248,7 +9121,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-27T08:32:26+00:00"
}, },
{ {
"name": "symfony/uid", "name": "symfony/uid",
@@ -9485,16 +9358,16 @@
}, },
{ {
"name": "thecodingmachine/safe", "name": "thecodingmachine/safe",
"version": "3.3.0", "version": "v3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thecodingmachine/safe.git", "url": "https://github.com/thecodingmachine/safe.git",
"reference": "51a45c524c0f074493565a9deaa39025f19b2b24" "reference": "2cdd579eeaa2e78e51c7509b50cc9fb89a956236"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thecodingmachine/safe/zipball/51a45c524c0f074493565a9deaa39025f19b2b24", "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2cdd579eeaa2e78e51c7509b50cc9fb89a956236",
"reference": "51a45c524c0f074493565a9deaa39025f19b2b24", "reference": "2cdd579eeaa2e78e51c7509b50cc9fb89a956236",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9604,7 +9477,7 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error", "description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"support": { "support": {
"issues": "https://github.com/thecodingmachine/safe/issues", "issues": "https://github.com/thecodingmachine/safe/issues",
"source": "https://github.com/thecodingmachine/safe/tree/3.3.0" "source": "https://github.com/thecodingmachine/safe/tree/v3.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -9620,7 +9493,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-05-13T20:06:28+00:00" "time": "2025-05-14T06:15:44+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@@ -11163,16 +11036,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "2.1.14", "version": "2.1.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2" "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f2e03099cac24ff3b379864d171c5acbfc6b9a2", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053",
"reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2", "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -11217,25 +11090,25 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-05-02T15:32:28+00:00" "time": "2025-05-21T20:55:28+00:00"
}, },
{ {
"name": "phpstan/phpstan-deprecation-rules", "name": "phpstan/phpstan-deprecation-rules",
"version": "2.0.2", "version": "2.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan-deprecation-rules.git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git",
"reference": "9d8e7d4e32711715ad78a1fb6ec368df9af01fdf" "reference": "468e02c9176891cc901143da118f09dc9505fc2f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/9d8e7d4e32711715ad78a1fb6ec368df9af01fdf", "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f",
"reference": "9d8e7d4e32711715ad78a1fb6ec368df9af01fdf", "reference": "468e02c9176891cc901143da118f09dc9505fc2f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.4 || ^8.0", "php": "^7.4 || ^8.0",
"phpstan/phpstan": "^2.1.13" "phpstan/phpstan": "^2.1.15"
}, },
"require-dev": { "require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2", "php-parallel-lint/php-parallel-lint": "^1.2",
@@ -11262,9 +11135,9 @@
"description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",
"source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.2" "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.3"
}, },
"time": "2025-04-26T19:59:57+00:00" "time": "2025-05-14T10:56:57+00:00"
}, },
{ {
"name": "phpstan/phpstan-strict-rules", "name": "phpstan/phpstan-strict-rules",
@@ -11316,16 +11189,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "12.2.1", "version": "12.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "448f2c504d86dbff3949dcd02c95aa85db2c7617" "reference": "9075a8efc66e11bc55c319062e147bdb06777267"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/448f2c504d86dbff3949dcd02c95aa85db2c7617", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9075a8efc66e11bc55c319062e147bdb06777267",
"reference": "448f2c504d86dbff3949dcd02c95aa85db2c7617", "reference": "9075a8efc66e11bc55c319062e147bdb06777267",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -11352,7 +11225,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "12.2.x-dev" "dev-main": "12.3.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -11381,7 +11254,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.2.1" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -11401,7 +11274,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-05-04T05:25:05+00:00" "time": "2025-05-23T15:49:03+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@@ -11650,16 +11523,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "12.1.5", "version": "12.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "f93ef2198df8d54b3195bcee381a33be51d8705e" "reference": "2fdf0056c673c8f0f1eed00030be5f8243c1e6e0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f93ef2198df8d54b3195bcee381a33be51d8705e", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2fdf0056c673c8f0f1eed00030be5f8243c1e6e0",
"reference": "f93ef2198df8d54b3195bcee381a33be51d8705e", "reference": "2fdf0056c673c8f0f1eed00030be5f8243c1e6e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -11681,7 +11554,7 @@
"sebastian/cli-parser": "^4.0.0", "sebastian/cli-parser": "^4.0.0",
"sebastian/comparator": "^7.0.1", "sebastian/comparator": "^7.0.1",
"sebastian/diff": "^7.0.0", "sebastian/diff": "^7.0.0",
"sebastian/environment": "^8.0.0", "sebastian/environment": "^8.0.1",
"sebastian/exporter": "^7.0.0", "sebastian/exporter": "^7.0.0",
"sebastian/global-state": "^8.0.0", "sebastian/global-state": "^8.0.0",
"sebastian/object-enumerator": "^7.0.0", "sebastian/object-enumerator": "^7.0.0",
@@ -11727,7 +11600,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.1.5" "source": "https://github.com/sebastianbergmann/phpunit/tree/12.1.6"
}, },
"funding": [ "funding": [
{ {
@@ -11751,7 +11624,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-05-11T06:44:52+00:00" "time": "2025-05-21T12:36:31+00:00"
}, },
{ {
"name": "rector/rector", "name": "rector/rector",
@@ -12076,16 +11949,16 @@
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
"version": "8.0.0", "version": "8.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/environment.git", "url": "https://github.com/sebastianbergmann/environment.git",
"reference": "8afe311eca49171bf95405cc0078be9a3821f9f2" "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8afe311eca49171bf95405cc0078be9a3821f9f2", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d364b9e5d0d3b18a2573351a1786fbf96b7e0792",
"reference": "8afe311eca49171bf95405cc0078be9a3821f9f2", "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -12128,15 +12001,27 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/environment/issues", "issues": "https://github.com/sebastianbergmann/environment/issues",
"security": "https://github.com/sebastianbergmann/environment/security/policy", "security": "https://github.com/sebastianbergmann/environment/security/policy",
"source": "https://github.com/sebastianbergmann/environment/tree/8.0.0" "source": "https://github.com/sebastianbergmann/environment/tree/8.0.2"
}, },
"funding": [ "funding": [
{ {
"url": "https://github.com/sebastianbergmann", "url": "https://github.com/sebastianbergmann",
"type": "github" "type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/sebastian/environment",
"type": "tidelift"
} }
], ],
"time": "2025-02-07T04:56:08+00:00" "time": "2025-05-21T15:05:44+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@@ -12679,22 +12564,22 @@
}, },
{ {
"name": "thecodingmachine/phpstan-safe-rule", "name": "thecodingmachine/phpstan-safe-rule",
"version": "v1.4.0", "version": "v1.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thecodingmachine/phpstan-safe-rule.git", "url": "https://github.com/thecodingmachine/phpstan-safe-rule.git",
"reference": "33dcbc3228c55ea4c364ecf74a3661cf7b7f168d" "reference": "5f9795eae8891dffa475965463a4281633651768"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/33dcbc3228c55ea4c364ecf74a3661cf7b7f168d", "url": "https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/5f9795eae8891dffa475965463a4281633651768",
"reference": "33dcbc3228c55ea4c364ecf74a3661cf7b7f168d", "reference": "5f9795eae8891dffa475965463a4281633651768",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"nikic/php-parser": "^5", "nikic/php-parser": "^5",
"php": "^8.1", "php": "^8.1",
"phpstan/phpstan": "^2.0", "phpstan/phpstan": "^2.1.11",
"thecodingmachine/safe": "^1.2 || ^2.0 || ^3.0" "thecodingmachine/safe": "^1.2 || ^2.0 || ^3.0"
}, },
"require-dev": { "require-dev": {
@@ -12731,9 +12616,9 @@
"description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe", "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe",
"support": { "support": {
"issues": "https://github.com/thecodingmachine/phpstan-safe-rule/issues", "issues": "https://github.com/thecodingmachine/phpstan-safe-rule/issues",
"source": "https://github.com/thecodingmachine/phpstan-safe-rule/tree/v1.4.0" "source": "https://github.com/thecodingmachine/phpstan-safe-rule/tree/v1.4.1"
}, },
"time": "2025-02-11T12:41:29+00:00" "time": "2025-04-09T20:30:35+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",

View File

@@ -42,15 +42,10 @@ use FireflyIII\Providers\SearchServiceProvider;
use FireflyIII\Providers\SessionServiceProvider; use FireflyIII\Providers\SessionServiceProvider;
use FireflyIII\Providers\TagServiceProvider; use FireflyIII\Providers\TagServiceProvider;
use FireflyIII\Support\Facades\AccountForm; use FireflyIII\Support\Facades\AccountForm;
use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\CurrencyForm; use FireflyIII\Support\Facades\CurrencyForm;
use FireflyIII\Support\Facades\ExpandedForm; use FireflyIII\Support\Facades\ExpandedForm;
use FireflyIII\Support\Facades\FireflyConfig;
use FireflyIII\Support\Facades\Navigation;
use FireflyIII\Support\Facades\PiggyBankForm; use FireflyIII\Support\Facades\PiggyBankForm;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Support\Facades\RuleForm; use FireflyIII\Support\Facades\RuleForm;
use FireflyIII\Support\Facades\Steam;
use Illuminate\Auth\AuthServiceProvider; use Illuminate\Auth\AuthServiceProvider;
use Illuminate\Auth\Passwords\PasswordResetServiceProvider; use Illuminate\Auth\Passwords\PasswordResetServiceProvider;
use Illuminate\Broadcasting\BroadcastServiceProvider; use Illuminate\Broadcasting\BroadcastServiceProvider;
@@ -58,7 +53,6 @@ use Illuminate\Bus\BusServiceProvider;
use Illuminate\Cache\CacheServiceProvider; use Illuminate\Cache\CacheServiceProvider;
use Illuminate\Cookie\CookieServiceProvider; use Illuminate\Cookie\CookieServiceProvider;
use Illuminate\Database\DatabaseServiceProvider; use Illuminate\Database\DatabaseServiceProvider;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Encryption\EncryptionServiceProvider; use Illuminate\Encryption\EncryptionServiceProvider;
use Illuminate\Filesystem\FilesystemServiceProvider; use Illuminate\Filesystem\FilesystemServiceProvider;
use Illuminate\Foundation\Providers\ConsoleSupportServiceProvider; use Illuminate\Foundation\Providers\ConsoleSupportServiceProvider;
@@ -70,47 +64,15 @@ use Illuminate\Pagination\PaginationServiceProvider;
use Illuminate\Pipeline\PipelineServiceProvider; use Illuminate\Pipeline\PipelineServiceProvider;
use Illuminate\Queue\QueueServiceProvider; use Illuminate\Queue\QueueServiceProvider;
use Illuminate\Redis\RedisServiceProvider; use Illuminate\Redis\RedisServiceProvider;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\Facades\Bus;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Str;
use Illuminate\Translation\TranslationServiceProvider; use Illuminate\Translation\TranslationServiceProvider;
use Illuminate\Validation\ValidationServiceProvider; use Illuminate\Validation\ValidationServiceProvider;
use Illuminate\View\ViewServiceProvider; use Illuminate\View\ViewServiceProvider;
use PragmaRX\Google2FALaravel\Facade;
use Spatie\Html\Facades\Html; use Spatie\Html\Facades\Html;
use TwigBridge\Facade\Twig;
use TwigBridge\ServiceProvider; use TwigBridge\ServiceProvider;
return [ return [
@@ -179,56 +141,17 @@ return [
RecurringServiceProvider::class, RecurringServiceProvider::class,
], ],
'aliases' => [ 'aliases' => [
'App' => App::class,
'Artisan' => Artisan::class,
'Auth' => Auth::class, 'Auth' => Auth::class,
'Blade' => Blade::class,
'Broadcast' => Broadcast::class,
'Bus' => Bus::class,
'Cache' => Cache::class,
'Config' => Config::class,
'Cookie' => Cookie::class,
'Crypt' => Crypt::class,
'DB' => DB::class,
'Eloquent' => Model::class,
'Event' => Event::class,
'File' => File::class,
'Gate' => Gate::class,
'Hash' => Hash::class,
'Lang' => Lang::class,
'Log' => Log::class,
'Mail' => Mail::class,
'Notification' => Notification::class,
'Password' => Password::class,
'Queue' => Queue::class,
'Redirect' => Redirect::class,
'Redis' => Redis::class,
'Request' => Request::class,
'Response' => Response::class,
'Route' => Route::class, 'Route' => Route::class,
'Schema' => Schema::class, 'Config' => Config::class,
'Session' => Session::class, 'Session' => Session::class,
'Storage' => Storage::class,
'URL' => URL::class, 'URL' => URL::class,
'Validator' => Validator::class,
'View' => View::class,
'Html' => Html::class, 'Html' => Html::class,
'Preferences' => Preferences::class,
'FireflyConfig' => FireflyConfig::class,
'Navigation' => Navigation::class,
'Amount' => Amount::class,
'Steam' => Steam::class,
'ExpandedForm' => ExpandedForm::class,
'CurrencyForm' => CurrencyForm::class,
'AccountForm' => AccountForm::class, 'AccountForm' => AccountForm::class,
'CurrencyForm' => CurrencyForm::class,
'ExpandedForm' => ExpandedForm::class,
'PiggyBankForm' => PiggyBankForm::class, 'PiggyBankForm' => PiggyBankForm::class,
'RuleForm' => RuleForm::class, 'RuleForm' => RuleForm::class,
'Google2FA' => Facade::class,
'Twig' => Twig::class,
'Arr' => Arr::class,
'Http' => Http::class,
'Str' => Str::class,
], ],
'asset_url' => env('ASSET_URL', null), 'asset_url' => env('ASSET_URL', null),

View File

@@ -78,7 +78,7 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', false), 'running_balance_column' => env('USE_RUNNING_BALANCE', false),
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-05-14', 'version' => 'develop/2025-05-26',
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 25, 'db_version' => 25,

View File

@@ -32,7 +32,7 @@ return [
'table' => 'sessions', 'table' => 'sessions',
'store' => null, 'store' => null,
'lottery' => [2, 100], 'lottery' => [2, 100],
'cookie' => 'firefly_session', 'cookie' => env('COOKIE_NAME', 'firefly_iii_session'),
'path' => env('COOKIE_PATH', '/'), 'path' => env('COOKIE_PATH', '/'),
'domain' => env('COOKIE_DOMAIN', null), 'domain' => env('COOKIE_DOMAIN', null),
'secure' => env('COOKIE_SECURE', null), 'secure' => env('COOKIE_SECURE', null),

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateSupportTables. * Class CreateSupportTables.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateUsersTable. * Class CreateUsersTable.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateMainTables. * Class CreateMainTables.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class FixNullables. * Class FixNullables.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ExpandTransactionsTable. * Class ExpandTransactionsTable.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV410. * Class ChangesForV410.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV420. * Class ChangesForV420.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV430. * Class ChangesForV430.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV431. * Class ChangesForV431.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV440. * Class ChangesForV440.

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV450. * Class ChangesForV450.

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV472. * Class ChangesForV472.

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV475. * Class ChangesForV475.

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