Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an OCP API for console commands #32780

Closed
wants to merge 3 commits into from

Conversation

ChristophWurst
Copy link
Member

Very similar to #32332 but without leaking any Symfony types in our API.

The goal is to get as close to Symfony as necessary but without tight coupling.

Todo

  • Finish minimal API
  • Migrate a few core commands for demo/testing purposes
  • Move to app framework namespace?
  • Document this new API in the dev docs

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst added this to the Nextcloud 25 milestone Jun 9, 2022
@ChristophWurst ChristophWurst self-assigned this Jun 9, 2022
$this->setDescription($this->command->getDescription());
}

protected function execute(InputInterface $input, OutputInterface $output) {

Check failure

Code scanning / Psalm

InvalidReturnType

No return statements were found for method OC\Command\SymfonyCommandAdapter::execute but return type 'int' was expected
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
return 'List all calendars of a user';
}

public function configure(IConfiguration $configuration): void {

Check failure

Code scanning / Psalm

ParamNameMismatch

Argument 1 of OCA\DAV\Command\ListCalendars::configure has wrong name $configuration, expecting $config as defined by OCP\Command\Command::configure
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
@ChristophWurst ChristophWurst removed this from the Nextcloud 25 milestone Aug 31, 2022
@ChristophWurst
Copy link
Member Author

Realistically I don't have time to finish this, even if I really wish we had such an API soon.

@ChristophWurst ChristophWurst deleted the enhancement/ocp-command-api branch October 31, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

1 participant