fix: replace console messages with unified command.

This commit is contained in:
James Cole
2023-06-20 07:16:56 +02:00
parent f2b2c2109f
commit 42043de34f
62 changed files with 767 additions and 512 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\AccountMetaFactory;
use FireflyIII\Models\Account;
@@ -42,6 +43,8 @@ use Psr\Container\NotFoundExceptionInterface;
*/
class UpgradeLiabilities extends Command
{
use ShowsFriendlyMessages;
public const CONFIG_NAME = '560_upgrade_liabilities';
protected $description = 'Upgrade liabilities to new 5.6.0 structure.';
protected $signature = 'firefly-iii:upgrade-liabilities {--F|force : Force the execution of this command.}';
@@ -57,7 +60,7 @@ class UpgradeLiabilities extends Command
public function handle(): int
{
if ($this->isExecuted() && true !== $this->option('force')) {
$this->info('Correct: this command has already been executed.');
$this->friendlyInfo('This command has already been executed.');
return 0;
}