run($this->output); if (! $result['ok']) { foreach ($result['warnings'] as $warning) { $this->error($warning); } return self::FAILURE; } $this->info('System roles are in place.'); if ($result['cleared'] !== []) { $this->info('Cleared the compiled configuration, events, routes and views.'); } if ($result['rewarmed'] !== []) { $this->info('Rebuilt the route, event and view caches — they were in place before.'); } $this->info('Asked the background workers to restart.'); foreach ($result['warnings'] as $warning) { $this->warn($warning); } $this->newLine(); $this->info($this->summary($result['from'], $result['to'])); // A container is replaced rather than reloaded, and its operator // has no systemd to reload anything with — printing this there // would send them looking for a service that does not exist. if ($installation->kind() === InstallationKind::Manual) { $this->newLine(); $this->warn('The web server is still running the code it compiled before this ran.'); $this->warn('Reload PHP-FPM now, or it will keep serving it: sudo systemctl reload php8.4-fpm'); } return self::SUCCESS; } private function summary(string $from, string $to): string { if ($from === '') { return "Applied {$to}."; } if ($from === $to) { return "Re-applied {$to}."; } return "Updated from {$from} to {$to}."; } }