fix: Remove workaround for old version of frankenphp

Not needed in v1.12.3

And update caddyfile

Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
Carl Schwan 2026-06-02 16:56:55 +02:00
parent 2933ddd31d
commit 64d222486f
No known key found for this signature in database
GPG key ID: 02325448204E452A
3 changed files with 13 additions and 7 deletions

View file

@ -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 {

View file

@ -92,6 +92,7 @@ $expectedFiles = [
'vite.config.ts',
'vitest.config.ts',
'window.d.ts',
'Caddyfile',
];
$actualFiles = [];

View file

@ -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) {