From 9c07ddaed62a11563316f73ddd8e2c1371cc6364 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Mar 2024 17:48:13 +0100 Subject: [PATCH] Replace shitty Laravel Passport command. --- .../Commands/System/LaravelPassportKeys.php | 62 +++++++++++++++++++ app/Console/Commands/Tools/ApplyRules.php | 6 +- app/Console/Commands/Tools/Cron.php | 6 +- app/Support/System/OAuthKeys.php | 2 +- composer.json | 2 +- 5 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 app/Console/Commands/System/LaravelPassportKeys.php diff --git a/app/Console/Commands/System/LaravelPassportKeys.php b/app/Console/Commands/System/LaravelPassportKeys.php new file mode 100644 index 0000000000..4bf490f297 --- /dev/null +++ b/app/Console/Commands/System/LaravelPassportKeys.php @@ -0,0 +1,62 @@ +friendlyInfo('Encryption keys exist already.'); + return CommandAlias::SUCCESS; + + } + $this->friendlyPositive('Encryption keys have been created, nice!'); + return CommandAlias::SUCCESS; + } +} diff --git a/app/Console/Commands/Tools/ApplyRules.php b/app/Console/Commands/Tools/ApplyRules.php index ee108f678a..0b244799e2 100644 --- a/app/Console/Commands/Tools/ApplyRules.php +++ b/app/Console/Commands/Tools/ApplyRules.php @@ -1,7 +1,7 @@ . + * along with this program. If not, see https://www.gnu.org/licenses/. */ declare(strict_types=1); diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php index 4b3b0177b9..d7297ff629 100644 --- a/app/Console/Commands/Tools/Cron.php +++ b/app/Console/Commands/Tools/Cron.php @@ -1,8 +1,8 @@ . + * along with this program. If not, see https://www.gnu.org/licenses/. */ declare(strict_types=1); diff --git a/app/Support/System/OAuthKeys.php b/app/Support/System/OAuthKeys.php index f46af222c1..5a7501dd03 100644 --- a/app/Support/System/OAuthKeys.php +++ b/app/Support/System/OAuthKeys.php @@ -88,7 +88,7 @@ class OAuthKeys public static function generateKeys(): void { \Artisan::registerCommand(new KeysCommand()); - \Artisan::call('passport:keys'); + \Artisan::call('firefly-iii:laravel-passport-keys'); } public static function storeKeysInDB(): void diff --git a/composer.json b/composer.json index 025a655615..46dac18b5d 100644 --- a/composer.json +++ b/composer.json @@ -167,7 +167,7 @@ "@php artisan firefly-iii:upgrade-database", "@php artisan firefly-iii:correct-database", "@php artisan firefly-iii:report-integrity", - "@php artisan passport:keys", + "@php artisan firefly-iii:laravel-passport-keys", "@php artisan firefly:instructions update" ], "post-install-cmd": [