Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update commands.
James Coleb9249a4d9669
diff --git a/app/Console/Commands/Correction/CorrectionSkeleton.php.stub b/app/Console/Commands/Correction/CorrectionSkeleton.php.stubindex 8f620c0d22..400a630f8f 100644--- a/app/Console/Commands/Correction/CorrectionSkeleton.php.stub+++ b/app/Console/Commands/Correction/CorrectionSkeleton.php.stub@@ -4,10 +4,6 @@ namespace FireflyIII\Console\Commands\Correction;use Illuminate\Console\Command;-/**- * Class CorrectionSkeleton- * TODO DONT FORGET TO ADD THIS TO THE DOCKER BUILD- */class CorrectionSkeleton extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CorrectsGroupAccounts.php b/app/Console/Commands/Correction/CorrectsGroupAccounts.phpindex ddafa932c5..584e2aad84 100644--- a/app/Console/Commands/Correction/CorrectsGroupAccounts.php+++ b/app/Console/Commands/Correction/CorrectsGroupAccounts.php@@ -31,9 +31,6 @@ use FireflyIII\Models\TransactionGroup;use FireflyIII\Models\TransactionJournal;use Illuminate\Console\Command;-/**- * Class FixGroupAccounts- */class CorrectsGroupAccounts extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CorrectsPiggyBanks.php b/app/Console/Commands/Correction/CorrectsPiggyBanks.phpindex e5928093d0..8922629960 100644--- a/app/Console/Commands/Correction/CorrectsPiggyBanks.php+++ b/app/Console/Commands/Correction/CorrectsPiggyBanks.php@@ -29,11 +29,6 @@ use FireflyIII\Models\PiggyBankEvent;use FireflyIII\Models\TransactionJournal;use Illuminate\Console\Command;-/**- * Report (and fix) piggy banks.- *- * Class FixPiggies- */class CorrectsPiggyBanks extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CorrectsTransferBudgets.php b/app/Console/Commands/Correction/CorrectsTransferBudgets.phpindex 6c95fe2ab0..7d33e95a8d 100644--- a/app/Console/Commands/Correction/CorrectsTransferBudgets.php+++ b/app/Console/Commands/Correction/CorrectsTransferBudgets.php@@ -29,9 +29,6 @@ use FireflyIII\Models\TransactionJournal;use FireflyIII\Models\TransactionType;use Illuminate\Console\Command;-/**- * Class TransferBudgets- */class CorrectsTransferBudgets extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CorrectsUnevenAmount.php b/app/Console/Commands/Correction/CorrectsUnevenAmount.phpindex 791c9d5c90..c97d384462 100644--- a/app/Console/Commands/Correction/CorrectsUnevenAmount.php+++ b/app/Console/Commands/Correction/CorrectsUnevenAmount.php@@ -33,9 +33,6 @@ use FireflyIII\Support\Models\AccountBalanceCalculator;use Illuminate\Console\Command;use Illuminate\Support\Facades\Log;-/**- * Class FixUnevenAmount- */class CorrectsUnevenAmount extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CreatesAccessTokens.php b/app/Console/Commands/Correction/CreatesAccessTokens.phpindex d1408446d1..2dcfcb7ffd 100644--- a/app/Console/Commands/Correction/CreatesAccessTokens.php+++ b/app/Console/Commands/Correction/CreatesAccessTokens.php@@ -29,9 +29,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;use FireflyIII\User;use Illuminate\Console\Command;-/**- * Class CreateAccessTokens- */class CreatesAccessTokens extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/CreatesLinkTypes.php b/app/Console/Commands/Correction/CreatesLinkTypes.phpindex 8b9e4f6cfe..19592b03cf 100644--- a/app/Console/Commands/Correction/CreatesLinkTypes.php+++ b/app/Console/Commands/Correction/CreatesLinkTypes.php@@ -28,9 +28,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;use FireflyIII\Models\LinkType;use Illuminate\Console\Command;-/**- * Class CreateLinkTypes. Created all link types in case a migration hasn't fired.- */class CreatesLinkTypes extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/RemovesBills.php b/app/Console/Commands/Correction/RemovesBills.phpindex 8588607c45..e327e37b5e 100644--- a/app/Console/Commands/Correction/RemovesBills.php+++ b/app/Console/Commands/Correction/RemovesBills.php@@ -29,9 +29,6 @@ use FireflyIII\Models\TransactionJournal;use FireflyIII\Models\TransactionType;use Illuminate\Console\Command;-/**- * Class RemoveBills- */class RemovesBills extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/RemovesEmptyGroups.php b/app/Console/Commands/Correction/RemovesEmptyGroups.phpindex 5d0b86d59f..0d68e7f1a2 100644--- a/app/Console/Commands/Correction/RemovesEmptyGroups.php+++ b/app/Console/Commands/Correction/RemovesEmptyGroups.php@@ -29,9 +29,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;use FireflyIII\Models\TransactionGroup;use Illuminate\Console\Command;-/**- * Class DeleteEmptyGroups- */class RemovesEmptyGroups extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/RemovesEmptyJournals.php b/app/Console/Commands/Correction/RemovesEmptyJournals.phpindex fad74548d0..cbb6c6c3e7 100644--- a/app/Console/Commands/Correction/RemovesEmptyJournals.php+++ b/app/Console/Commands/Correction/RemovesEmptyJournals.php@@ -30,9 +30,6 @@ use FireflyIII\Models\TransactionJournal;use Illuminate\Console\Command;use Illuminate\Database\QueryException;-/**- * Class DeleteEmptyJournals- */class RemovesEmptyJournals extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Correction/RestoresOAuthKeys.php b/app/Console/Commands/Correction/RestoresOAuthKeys.phpindex b50115eabe..8eaf3c79a7 100644--- a/app/Console/Commands/Correction/RestoresOAuthKeys.php+++ b/app/Console/Commands/Correction/RestoresOAuthKeys.php@@ -28,9 +28,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;use FireflyIII\Support\System\OAuthKeys;use Illuminate\Console\Command;-/**- * Class RestoreOAuthKeys- */class RestoresOAuthKeys extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportsData.phpsimilarity index 99%rename from app/Console/Commands/Export/ExportData.phprename to app/Console/Commands/Export/ExportsData.phpindex e28ffa39a9..97f528f7cd 100644--- a/app/Console/Commands/Export/ExportData.php+++ b/app/Console/Commands/Export/ExportsData.php@@ -36,10 +36,7 @@ use FireflyIII\Support\Export\ExportDataGenerator;use Illuminate\Console\Command;use Illuminate\Support\Collection;-/**- * Class ExportData- */-class ExportData extends Command+class ExportsData extends Command{use ShowsFriendlyMessages;use VerifiesAccessToken;diff --git a/app/Console/Commands/Integrity/ReportSkeleton.php.stub b/app/Console/Commands/Integrity/ReportSkeleton.php.stubindex fa771b24c9..5efa56a32a 100644--- a/app/Console/Commands/Integrity/ReportSkeleton.php.stub+++ b/app/Console/Commands/Integrity/ReportSkeleton.php.stub@@ -4,10 +4,6 @@ namespace FireflyIII\Console\Commands\Integrity;use Illuminate\Console\Command;-/**- * Class ReportSkeleton- * TODO DONT FORGET TO ADD THIS TO THE DOCKER BUILD- */class ReportSkeleton extends Command{diff --git a/app/Console/Commands/Integrity/ReportsEmptyObjects.php b/app/Console/Commands/Integrity/ReportsEmptyObjects.phpindex 882df65b5d..06c9d99d0c 100644--- a/app/Console/Commands/Integrity/ReportsEmptyObjects.php+++ b/app/Console/Commands/Integrity/ReportsEmptyObjects.php@@ -31,9 +31,6 @@ use FireflyIII\Models\Category;use FireflyIII\Models\Tag;use Illuminate\Console\Command;-/**- * Class ReportEmptyObjects- */class ReportsEmptyObjects extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Integrity/ReportsIntegrity.php b/app/Console/Commands/Integrity/ReportsIntegrity.phpindex 4a77332b4d..1d180a31e6 100644--- a/app/Console/Commands/Integrity/ReportsIntegrity.php+++ b/app/Console/Commands/Integrity/ReportsIntegrity.php@@ -27,9 +27,6 @@ namespace FireflyIII\Console\Commands\Integrity;use FireflyIII\Console\Commands\ShowsFriendlyMessages;use Illuminate\Console\Command;-/**- * Class ReportIntegrity- */class ReportsIntegrity extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Integrity/ReportsSums.php b/app/Console/Commands/Integrity/ReportsSums.phpindex 93de322e50..f08c942d3a 100644--- a/app/Console/Commands/Integrity/ReportsSums.php+++ b/app/Console/Commands/Integrity/ReportsSums.php@@ -29,9 +29,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;use FireflyIII\User;use Illuminate\Console\Command;-/**- * Class ReportSkeleton- */class ReportsSums extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/LaravelPassportKeys.php b/app/Console/Commands/System/CallsLaravelPassportKeys.phpsimilarity index 97%rename from app/Console/Commands/System/LaravelPassportKeys.phprename to app/Console/Commands/System/CallsLaravelPassportKeys.phpindex 68003d0914..859a6817cd 100644--- a/app/Console/Commands/System/LaravelPassportKeys.php+++ b/app/Console/Commands/System/CallsLaravelPassportKeys.php@@ -28,7 +28,7 @@ use Illuminate\Console\Command;use Illuminate\Support\Facades\Artisan;use Symfony\Component\Console\Command\Command as CommandAlias;-class LaravelPassportKeys extends Command+class CallsLaravelPassportKeys extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/CreateDatabase.php b/app/Console/Commands/System/CreatesDatabase.phpsimilarity index 98%rename from app/Console/Commands/System/CreateDatabase.phprename to app/Console/Commands/System/CreatesDatabase.phpindex 64b1c65895..bb7f4bb23f 100644--- a/app/Console/Commands/System/CreateDatabase.php+++ b/app/Console/Commands/System/CreatesDatabase.php@@ -28,10 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;use Illuminate\Console\Command;use PDO;-/**- * Class CreateDatabase- */-class CreateDatabase extends Command+class CreatesDatabase extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/CreateFirstUser.php b/app/Console/Commands/System/CreatesFirstUser.phpsimilarity index 95%rename from app/Console/Commands/System/CreateFirstUser.phprename to app/Console/Commands/System/CreatesFirstUser.phpindex 8a4d5dc882..3df76aa989 100644--- a/app/Console/Commands/System/CreateFirstUser.php+++ b/app/Console/Commands/System/CreatesFirstUser.php@@ -29,16 +29,13 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;use Illuminate\Console\Command;use Illuminate\Support\Facades\Hash;-/**- * Class CreateFirstUser- */-class CreateFirstUser extends Command+class CreatesFirstUser extends Command{use ShowsFriendlyMessages;protected $description = 'Creates a new user and gives admin rights. Outputs the password on the command line. Strictly for testing.';- protected $signature = 'firefly-iii:create-first-user {email}';+ protected $signature = 'system:create-first-user {email}';private UserRepositoryInterface $repository;/**diff --git a/app/Console/Commands/System/ForceDecimalSize.php b/app/Console/Commands/System/ForcesDecimalSize.phpsimilarity index 99%rename from app/Console/Commands/System/ForceDecimalSize.phprename to app/Console/Commands/System/ForcesDecimalSize.phpindex 2683c7fc01..66c97cdfdd 100644--- a/app/Console/Commands/System/ForceDecimalSize.php+++ b/app/Console/Commands/System/ForcesDecimalSize.php@@ -44,13 +44,11 @@ use Illuminate\Support\Collection;use Illuminate\Support\Facades\DB;/**- * Class ForceDecimalSize- ** This command was inspired by https://github.com/elliot-gh. It will check all amount fields* and their values and correct them to the correct number of decimal places. This fixes issues where* Firefly III would store 0.01 as 0.01000000000000000020816681711721685132943093776702880859375.*/-class ForceDecimalSize extends Command+class ForcesDecimalSize extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/ForceMigration.php b/app/Console/Commands/System/ForcesMigrations.phpsimilarity index 97%rename from app/Console/Commands/System/ForceMigration.phprename to app/Console/Commands/System/ForcesMigrations.phpindex 2857c8157d..479031c62e 100644--- a/app/Console/Commands/System/ForceMigration.php+++ b/app/Console/Commands/System/ForcesMigrations.php@@ -33,10 +33,7 @@ use Illuminate\Support\Facades\DB;use Illuminate\Support\Facades\Log;use Illuminate\Support\Facades\Schema;-/**- * Class ForceMigration- */-class ForceMigration extends Command+class ForcesMigrations extends Command{use ShowsFriendlyMessages;use VerifiesAccessToken;diff --git a/app/Console/Commands/System/UpgradeFireflyInstructions.php b/app/Console/Commands/System/OutputsInstructions.phpsimilarity index 90%rename from app/Console/Commands/System/UpgradeFireflyInstructions.phprename to app/Console/Commands/System/OutputsInstructions.phpindex bcfaec9fa5..7842cf1ad6 100644--- a/app/Console/Commands/System/UpgradeFireflyInstructions.php+++ b/app/Console/Commands/System/OutputsInstructions.php@@ -27,16 +27,13 @@ namespace FireflyIII\Console\Commands\System;use FireflyIII\Support\System\GeneratesInstallationId;use Illuminate\Console\Command;-/**- * Class UpgradeFireflyInstructions.- */-class UpgradeFireflyInstructions extends Command+class OutputsInstructions extends Command{use GeneratesInstallationId;protected $description = 'Instructions in case of upgrade trouble.';- protected $signature = 'firefly:instructions {task}';+ protected $signature = 'firefly-iii:instructions {task=install}';/*** Execute the console command.@@ -79,7 +76,7 @@ class UpgradeFireflyInstructions extends Command}$prefix = 'v';- if (str_starts_with($version, 'develop')) {+ if (str_starts_with($version, 'develop') || str_starts_with($version, 'branch')) {$prefix = '';}@@ -94,6 +91,8 @@ class UpgradeFireflyInstructions extends Command$this->boxedInfo('There are no extra upgrade instructions.');$this->boxed('Firefly III should be ready for use.');$this->boxed('');+ $this->donationText();+ $this->boxed('');$this->showLine();return;@@ -102,6 +101,8 @@ class UpgradeFireflyInstructions extends Command$this->boxed(sprintf('Thank you for updating to Firefly III, %s%s!', $prefix, $version));$this->boxedInfo($text);$this->boxed('');+ $this->donationText();+ $this->boxed('');$this->showLine();}@@ -213,6 +214,8 @@ class UpgradeFireflyInstructions extends Command$this->boxedInfo('There are no extra installation instructions.');$this->boxed('Firefly III should be ready for use.');$this->boxed('');+ $this->donationText();+ $this->boxed('');$this->showLine();return;@@ -221,6 +224,15 @@ class UpgradeFireflyInstructions extends Command$this->boxed(sprintf('Thank you for installing Firefly III, %s%s!', $prefix, $version));$this->boxedInfo($text);$this->boxed('');+ $this->donationText();+ $this->boxed('');$this->showLine();}++ private function donationText(): void+ {+ $this->boxed('Did you know you can support the development of Firefly III?');+ $this->boxed('You can donate in many ways, like GitHub Sponsors or Patreon.');+ $this->boxed('For more information, please visit https://bit.ly/donate-to-Firefly-III');+ }}diff --git a/app/Console/Commands/System/OutputVersion.php b/app/Console/Commands/System/OutputsVersion.phpsimilarity index 94%rename from app/Console/Commands/System/OutputVersion.phprename to app/Console/Commands/System/OutputsVersion.phpindex 88835900b8..56050f3cd4 100644--- a/app/Console/Commands/System/OutputVersion.php+++ b/app/Console/Commands/System/OutputsVersion.php@@ -26,10 +26,7 @@ namespace FireflyIII\Console\Commands\System;use Illuminate\Console\Command;-/**- * Class OutputVersion- */-class OutputVersion extends Command+class OutputsVersion extends Command{protected $description = 'Outputs the Firefly III version';diff --git a/app/Console/Commands/System/ScanAttachments.php b/app/Console/Commands/System/ScansAttachments.phpsimilarity index 97%rename from app/Console/Commands/System/ScanAttachments.phprename to app/Console/Commands/System/ScansAttachments.phpindex 50f3b96881..eac9f9b774 100644--- a/app/Console/Commands/System/ScanAttachments.php+++ b/app/Console/Commands/System/ScansAttachments.php@@ -29,10 +29,7 @@ use FireflyIII\Models\Attachment;use Illuminate\Console\Command;use Illuminate\Contracts\Encryption\DecryptException;-/**- * Class ScanAttachments.- */-class ScanAttachments extends Command+class ScansAttachments extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/SetLatestVersion.php b/app/Console/Commands/System/SetsLatestVersion.phpsimilarity index 95%rename from app/Console/Commands/System/SetLatestVersion.phprename to app/Console/Commands/System/SetsLatestVersion.phpindex 71889bd0b0..f6207ee15a 100644--- a/app/Console/Commands/System/SetLatestVersion.php+++ b/app/Console/Commands/System/SetsLatestVersion.php@@ -27,10 +27,7 @@ namespace FireflyIII\Console\Commands\System;use FireflyIII\Console\Commands\ShowsFriendlyMessages;use Illuminate\Console\Command;-/**- * Class SetLatestVersion- */-class SetLatestVersion extends Command+class SetsLatestVersion extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/System/VerifySecurityAlerts.php b/app/Console/Commands/System/VerifySecurityAlerts.phpindex aa60146808..ce05afa16b 100644--- a/app/Console/Commands/System/VerifySecurityAlerts.php+++ b/app/Console/Commands/System/VerifySecurityAlerts.php@@ -29,9 +29,6 @@ use Illuminate\Console\Command;use Illuminate\Database\QueryException;use League\Flysystem\FilesystemException;-/**- * Class VerifySecurityAlerts- */class VerifySecurityAlerts extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Tools/ApplyRules.php b/app/Console/Commands/Tools/ApplyRules.phpindex 01d2c57a84..10cf1d37f0 100644--- a/app/Console/Commands/Tools/ApplyRules.php+++ b/app/Console/Commands/Tools/ApplyRules.php@@ -40,9 +40,6 @@ use Illuminate\Console\Command;use Illuminate\Support\Collection;use Illuminate\Support\Facades\Log;-/**- * Class ApplyRules- */class ApplyRules extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.phpindex 9481e9dd28..a86f187133 100644--- a/app/Console/Commands/Tools/Cron.php+++ b/app/Console/Commands/Tools/Cron.php@@ -34,9 +34,6 @@ use FireflyIII\Support\Cronjobs\RecurringCronjob;use Illuminate\Console\Command;use Illuminate\Support\Facades\Log;-/**- * Class Cron- */class Cron extends Command{use ShowsFriendlyMessages;diff --git a/app/Console/Commands/Upgrade/UpgradeSkeleton.php.stub b/app/Console/Commands/Upgrade/UpgradeSkeleton.php.stubindex 6dee8d3977..6a9c3897df 100644--- a/app/Console/Commands/Upgrade/UpgradeSkeleton.php.stub+++ b/app/Console/Commands/Upgrade/UpgradeSkeleton.php.stub@@ -4,9 +4,6 @@ namespace FireflyIII\Console\Commands\Upgrade;use Illuminate\Console\Command;-/**- * Class UpgradeSkeleton.- */class UpgradeSkeleton extends Command{use ShowsFriendlyMessages;diff --git a/composer.json b/composer.jsonindex 05c8cc9464..bfad00bff7 100644--- a/composer.json+++ b/composer.json@@ -172,13 +172,11 @@"@php artisan clear-compiled","@php artisan cache:clear","@php artisan firefly-iii:upgrade-database",- "@php artisan firefly-iii:correct-database",- "@php artisan firefly-iii:report-integrity","@php artisan firefly-iii:laravel-passport-keys",- "@php artisan firefly:instructions update"+ "@php artisan firefly-iii:instructions update"],"post-install-cmd": [- "@php artisan firefly:instructions install",+ "@php artisan firefly-iii:instructions install","@php artisan firefly-iii:verify-security-alerts"],"unit-test": [