Skip to content

Commit 6b130ec

Browse files
committed
🧑‍💻 Use OptimizeClearCommand::getOptimizeClearTasks when getting optimize:clear tasks
1 parent 540c390 commit 6b130ec

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@ public function handle()
1818
{
1919
$this->components->info('Clearing cached bootstrap files.');
2020

21-
collect([
22-
'cache' => fn () => $this->gracefulCallSilent('cache:clear') == 0,
23-
'compiled' => fn () => $this->gracefulCallSilent('clear-compiled') == 0,
24-
'config' => fn () => $this->gracefulCallSilent('config:clear') == 0,
25-
'events' => fn () => $this->gracefulCallSilent('event:clear') == 0,
26-
'routes' => fn () => $this->gracefulCallSilent('route:clear') == 0,
27-
'views' => fn () => $this->gracefulCallSilent('view:clear') == 0,
28-
])->each(fn ($task, $description) => $this->components->task($description, $task));
21+
foreach ($this->getOptimizeClearTasks() as $description => $command) {
22+
$this->components->task($description, fn () => $this->gracefulCallSilent($command) == 0);
23+
}
2924

3025
$this->newLine();
3126
}

0 commit comments

Comments
 (0)