33.0.2: missing InputOption import in DocumentIndex breaks OCC command registration

Open Beginner friendly
#1,005 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
cli

Research direction

Start by inspecting lib/Command/DocumentIndex.php and its registration in appinfo/info.xml, then run the available OCC command checks in a local Nextcloud environment. Done means command registration succeeds, app:list runs, and fulltextsearch:test reaches its configuration and connection checks.

Written by the indexing model from the issue text.

Description

0. Needs triage bug

Problem

With Full text search 33.0.2 enabled on Nextcloud 33.0.8, OCC commands fail before they can run:

Class "OCA\FullTextSearch\Command\InputOption" not found

Both fulltextsearch:test and the unrelated app:list return exit code 1. They were run through Hetzner Storage Share's supported konsoleH OCC interface on 19 September 2026. A server-side stack trace is not exposed by that interface.

Source diagnosis

I inspected the official 33.0.2 release archive linked from the Nextcloud app store:
https://github.com/nextcloud-releases/fulltextsearch/releases/download/v33.0.2/fulltextsearch-v33.0.2.tar.gz

In lib/Command/DocumentIndex.php, line 42 calls:

->addOption('collection', null, InputOption::VALUE_OPTIONAL, 'collection to look the existing index up in, defaults to the internal collection');

However, the file does not import Symfony\Component\Console\Input\InputOption. PHP therefore resolves the name inside the app's command namespace, matching the reported error. DocumentIndex is listed in appinfo/info.xml, so this appears to abort registration of the enabled app's commands before the selected OCC command executes.

Proposed fix

 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;

The patch applies cleanly to the published release archive. It has not been applied or tested inside the managed Storage Share because customers do not have access to its PHP files.

Expected result

OCC command registration succeeds, app:list can run, and fulltextsearch:test reaches its actual configuration and connection checks.

Environment

  • Nextcloud 33.0.8, managed Hetzner Storage Share
  • Full text search 33.0.2 (administrator app UI)
  • Elasticsearch 8.19.21 on a separate host
  • PHP version 8.4.24
  • OS Linux 6.8.0-136-generic x86_64

I searched this repository's issues and pull requests for InputOption before reporting this and found no existing match.

Dominant language
PHP
Stars
234
Forks
64
Avg merge
6d 9h
Merged PRs (30d)
23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/fulltextsearch

All issues in nextcloud/fulltextsearch

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.