Show a maintenance page instead of a blank 500 and update in one click

Emergency layer logs fatal errors to var/log/notfall.log and answers 503.
The system page checks for a new release on load, shows its notes, runs
backup, download, switch, migration and health check in one flow with live
progress, and switches back automatically when the new version fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5.5 committed 2026-10-09 18:33:53 +02:00
1 parent 339a48c810
commit a6a334fe68
15 files changed
+973 -42

No files matched your search

+17 -6
View File
@@ -1,6 +1,7 @@
<?php
use App\Kernel;
use App\Ops\Notfall;
use Symfony\Component\HttpFoundation\Request;
// PHP nennt in jeder Antwort seine genaue Fassung („X-Powered-By: PHP/8.4.22"). Das nützt
@@ -8,9 +9,19 @@ use Symfony\Component\HttpFoundation\Request;
// Hosting laesst sich expose_php nicht umstellen, dieser Aufruf wirkt trotzdem.
header_remove('X-Powered-By');
require dirname(__DIR__).'/config/bootstrap.php';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
// Die Notfallschicht zuerst und ohne Autoloader (ADR 113): Scheitert alles Weitere - fehlende
// Abhängigkeiten, eine unlesbare Datenbank, ein Fehler beim Start -, sehen Besucher eine
// Wartungsseite statt einer weißen Seite, und der Grund steht in var/log/notfall.log.
require_once dirname(__DIR__).'/src/Ops/Notfall.php';
Notfall::einschalten(dirname(__DIR__));
try {
require dirname(__DIR__).'/config/bootstrap.php';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
} catch (Throwable $fehler) {
Notfall::ausnahme($fehler, $_SERVER['REQUEST_URI'] ?? '');
}