Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify artisan commands init #11519

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 5 additions & 79 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,12 @@

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
Commands\DbCreate::class,
Commands\DbSetup::class,

Commands\EsCreateSearchBlacklist::class,
Commands\EsIndexDocuments::class,
Commands\EsIndexScoresQueue::class,
Commands\EsIndexScoresSetSchema::class,
Commands\EsIndexWiki::class,

Commands\Ip2AsnUpdate::class,

// modding stuff
Commands\ModdingRankCommand::class,

Commands\UserForumStatSyncCommand::class,
Commands\BeatmapsetsHypeSyncCommand::class,
Commands\BeatmapsetNominationSyncCommand::class,

Commands\StoreCleanupStaleOrders::class,
Commands\StoreExpireProducts::class,
Commands\StoreGetPaypalOrder::class,
Commands\StoreGetShopifyCheckout::class,

// builds
Commands\BuildsCreate::class,
Commands\BuildsUpdatePropagationHistory::class,

// forum
Commands\ForumTopicCoversCleanup::class,

// leaderboard recalculation
Commands\RankingsRecalculateCountryStats::class,

// moddingv2 kudosu recalculation
Commands\KudosuRecalculateDiscussionsGrants::class,

// fix username change fail :D
Commands\FixUsernameChangeTopicCache::class,

// fix userchannel deletion fail
Commands\FixMissingUserChannels::class,

// fix forum display order
Commands\FixForumDisplayOrder::class,

Commands\MigrateFreshAllCommand::class,
Commands\MigrateFreshOrRunCommand::class,

Commands\NotificationsSendMail::class,

Commands\OAuthDeleteExpiredTokens::class,

Commands\RouteConvert::class,

Commands\UserBestScoresCheckCommand::class,
Commands\UserRecalculateRankCounts::class,

Commands\UserNotificationsCleanup::class,
Commands\NotificationsCleanup::class,

Commands\ChatExpireAck::class,
Commands\ChatChannelSetLastMessageId::class,

Commands\BeatmapLeadersRefresh::class,
protected function commands(): void
{
$this->load(__DIR__.'/Commands');

Commands\DailyChallengeCreateNext::class,
Commands\DailyChallengeUserStatsCalculate::class,
Commands\DailyChallengeUserStatsRecalculate::class,
];
require base_path('routes/console.php');
}

/**
* Define the application's command schedule.
Expand Down Expand Up @@ -152,9 +83,4 @@ protected function schedule(Schedule $schedule)
->cron('10 0 * * *')
->onOneServer();
}

protected function commands()
{
require base_path('routes/console.php');
}
}