From 64d222486f3375f1158d4c9fc3fcc385155d21db Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 2 Jun 2026 16:56:55 +0200 Subject: [PATCH] fix: Remove workaround for old version of frankenphp Not needed in v1.12.3 And update caddyfile Signed-off-by: Carl Schwan --- Caddyfile | 11 ++++++++++- build/files-checker.php | 1 + index.php | 8 ++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Caddyfile b/Caddyfile index b18b3129783..032e5d32529 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,6 +1,15 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# THIS IS AN EXPERIMENTAL FEATURE +# DO NOT USE THIS IN PRODUCTION, YOU HAVE BEEN WARNED. + localhost { php_server { - worker index.php + worker { + file index.php + watch + } } log { diff --git a/build/files-checker.php b/build/files-checker.php index b5d332cf116..8b44761bcfe 100644 --- a/build/files-checker.php +++ b/build/files-checker.php @@ -92,6 +92,7 @@ $expectedFiles = [ 'vite.config.ts', 'vitest.config.ts', 'window.d.ts', + 'Caddyfile', ]; $actualFiles = []; diff --git a/index.php b/index.php index a05281443e8..d4bdd263f79 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,7 @@ require_once __DIR__ . '/lib/OC.php'; \OC::boot(); -function cleanupStaticCrap(): void { +function resetStaticProperties(): void { // FIXME needed because these use a static var \OC_Hook::clear(); \OC_Util::$styles = []; @@ -38,11 +38,7 @@ function cleanupStaticCrap(): void { $handler = static function () { try { - // In worker mode, script name is empty in FrankenPHP - if ($_SERVER['SCRIPT_NAME'] === '') { - $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF']; - } - cleanupStaticCrap(); + resetStaticProperties(); OC::init(); OC::handleRequest(); } catch (ServiceUnavailableException $ex) {