From 5d63bfb9ad2409871e218cccf4e205ef5d0d8409 Mon Sep 17 00:00:00 2001 From: Roger Perren Date: Sat, 19 Sep 2026 11:18:15 +0200 Subject: [PATCH] Support Nextcloud 35 - Raise max-version to 35. Without it Nextcloud disables the app during the core upgrade to 35. - Declare the int return type on the execute() methods of the console commands. Symfony Console in Nextcloud 35 declares Command::execute(...): int, and the untyped overrides fail at class load time, which takes down every occ command (exit 255), not only the documentserver ones. Both execute() methods already return an int on every path. Co-Authored-By: Claude Opus 5 --- appinfo/info.xml | 2 +- lib/Command/FlushChanges.php | 2 +- lib/Command/Fonts.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index dab6c44..a0e0d41 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -33,7 +33,7 @@ Additionally, the community document server only supports running on x86-64 Linu https://raw.githubusercontent.com/nextcloud/documentserver_community/master/screenshots/main.png https://raw.githubusercontent.com/nextcloud/documentserver_community/master/screenshots/new.png - + diff --git a/lib/Command/FlushChanges.php b/lib/Command/FlushChanges.php index 3518851..02a8fc1 100644 --- a/lib/Command/FlushChanges.php +++ b/lib/Command/FlushChanges.php @@ -71,7 +71,7 @@ protected function configure() { parent::configure(); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $documents = $this->documentStore->getOpenDocuments(); // One document that will not assemble - a converter that chokes on it, diff --git a/lib/Command/Fonts.php b/lib/Command/Fonts.php index ed98582..b485e60 100644 --- a/lib/Command/Fonts.php +++ b/lib/Command/Fonts.php @@ -50,7 +50,7 @@ protected function configure() { parent::configure(); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $add = $input->getOption('add'); $remove = $input->getOption('remove'); $rebuild = $input->getOption('rebuild');