Update commands.

This commit is contained in:
James Cole
2024-12-27 09:30:41 +01:00
parent 6638ca270f
commit b9249a4d96
30 changed files with 30 additions and 104 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
/**

View File

@@ -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;

View File

@@ -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;

View File

@@ -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');
}
}

View File

@@ -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';

View File

@@ -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;

View File

@@ -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;

View File

@@ -29,9 +29,6 @@ use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use League\Flysystem\FilesystemException;
/**
* Class VerifySecurityAlerts
*/
class VerifySecurityAlerts extends Command
{
use ShowsFriendlyMessages;