Skip to content

Support Nextcloud 35: raise max-version, add int return type to console commands - #406

Open
blueforce wants to merge 1 commit into
nextcloud:masterfrom
blueforce:nc35-compat
Open

blueforce wants to merge 1 commit into
nextcloud:masterfrom
blueforce:nc35-compat

Conversation

@blueforce

Copy link
Copy Markdown

Nextcloud 35 support. Two separate problems, both hit on a production upgrade from 34 to 35.

1. The app is disabled during the core upgrade

appinfo/info.xml declares max-version="34" (also in 0.4.0), so the upgrade to 35 switches the app off. The onlyoffice connector then points at a document server that no longer exists: /apps/documentserver_community/healthcheck returns 404 and documents can't be opened.

→ max-version raised to 35.

2. Every occ command fails once the app is enabled on 35

Symfony Console in Nextcloud 35 declares Command::execute(InputInterface $input, OutputInterface $output): int. The untyped overrides in FlushChanges and Fonts fail when the commands are loaded:

Declaration of OCA\DocumentServer\Command\FlushChanges::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int

occ loads every app's commands, so this takes down all of occ (exit 255), not just documentserver:*. The web side keeps working (web requests don't load console commands), which makes it easy to miss: the healthcheck is green while occ upgrade, occ maintenance:mode etc. are broken.

→ : int added to both execute() methods. Both already return an int on every path (after the exit-code fix from #398), so there's no runtime change. Related history: #296.

Testing

Running these exact three changes on top of the 0.4.0 release, on a production instance:

  • Nextcloud 35.0.0, PHP 8.3.31, LiteSpeed, onlyoffice connector 10.1.2
  • Before: app disabled after the upgrade, healthcheck 404. After enabling with only the max-version bump: occ exit 255 with the error above.
  • After: app enables, /healthcheck returns true, occ status exits 0, documentserver:flush and documentserver:fonts are registered again, no errors in nextcloud.log.

Not yet verified on 35: a full editor round-trip (open, edit, save). I'll add a comment once that's done.

Side note for anyone landing here: the onlyoffice connector 10.1.2 is only declared for NC ≤ 34. 10.2.0 (33 to 35) is listed in the app store, but its release download currently returns 404, so it can't be installed yet.

🤖 Generated with Claude Code

- 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 <noreply@anthropic.com>
@chadek

chadek commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Provide a well signed-off commit, I'll then merge it and release

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants