Skip to content

Firefly III: a personal finances manager

Improve code quality, add PHP 8.5 things.

James Colec4392f89d19c
diff --git a/.ci/php-cs-fixer/.php-cs-fixer.php b/.ci/php-cs-fixer/.php-cs-fixer.php
index 5e55718f96..5406dc140e 100644
--- a/.ci/php-cs-fixer/.php-cs-fixer.php
+++ b/.ci/php-cs-fixer/.php-cs-fixer.php
@@ -43,6 +43,7 @@ return $config->setRules(
// rule sets
'@PHP8x3Migration' => true,
'@PHP8x4Migration' => true,
+ '@PHP8x5Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PSR12' => true,
diff --git a/.ci/php-cs-fixer/composer.json b/.ci/php-cs-fixer/composer.json
index 9795354e5e..cf755ad781 100644
--- a/.ci/php-cs-fixer/composer.json
+++ b/.ci/php-cs-fixer/composer.json
@@ -1,5 +1,6 @@
{
"require": {
+ "php": ">=8.5.0",
"friendsofphp/php-cs-fixer": "^3.12"
}
}
diff --git a/.ci/php-cs-fixer/composer.lock b/.ci/php-cs-fixer/composer.lock
index 896eecc1a6..c4ec1072ec 100644
--- a/.ci/php-cs-fixer/composer.lock
+++ b/.ci/php-cs-fixer/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f1e0b38af4ded66da271a99d2bff5be8",
+ "content-hash": "35b5ad9b3c4e1ffe78ef9bec73987499",
"packages": [
{
"name": "clue/ndjson-react",
@@ -2683,7 +2683,12 @@
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
- "platform": {},
+ "platform": {
+ "php": ">=8.5.0"
+ },
"platform-dev": {},
+ "platform-overrides": {
+ "php": "8.5"
+ },
"plugin-api-version": "2.9.0"
}
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index 94bb51c858..23a6214dbb 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -1142,6 +1142,7 @@ class GroupCollector implements GroupCollectorInterface
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->orderBy('transaction_journals.description', 'DESC')
- ->orderBy('source.amount', 'DESC');
+ ->orderBy('source.amount', 'DESC')
+ ;
}
}
diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.php
index 81789aa918..9bdcbf98e4 100644
--- a/app/Providers/FireflySessionProvider.php
+++ b/app/Providers/FireflySessionProvider.php
@@ -51,7 +51,9 @@ class FireflySessionProvider extends ServiceProvider
*/
protected function registerSessionDriver(): void
{
- $this->app->singleton('session.store', static fn ($app)
+ $this->app->singleton(
+ 'session.store',
+ static fn ($app)
// First, we will create the session manager which is responsible for the
// creation of the various session drivers when they are needed by the
// application instance, and will resolve them on a lazy load basis.
diff --git a/tests/integration/Api/Models/Account/ShowControllerTest.php b/tests/integration/Api/Models/Account/ShowControllerTest.php
index f2b3aae24f..611efa3da9 100644
--- a/tests/integration/Api/Models/Account/ShowControllerTest.php
+++ b/tests/integration/Api/Models/Account/ShowControllerTest.php
@@ -100,6 +100,7 @@ final class ShowControllerTest extends TestCase
Account::factory()
->for($this->user)
->withType(AccountTypeEnum::ASSET)
- ->create();
+ ->create()
+ ;
}
}