chore: add missing Override attribute to core code

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-04-28 20:41:32 +02:00
parent e0ba4d71b6
commit 20acaf307e
No known key found for this signature in database
GPG key ID: 7E849AE05218500F
226 changed files with 425 additions and 0 deletions

View file

@ -53,6 +53,7 @@ class Application extends App implements IBootstrap {
parent::__construct(self::APP_ID, $urlParams);
}
#[\Override]
public function register(IRegistrationContext $context): void {
$context->registerService('defaultMailAddress', function () {
return Util::getDefaultEmailAddress('lostpassword-noreply');
@ -90,6 +91,7 @@ class Application extends App implements IBootstrap {
$context->registerCapability(Capabilities::class);
}
#[\Override]
public function boot(IBootContext $context): void {
// ...
}

View file

@ -29,6 +29,7 @@ class Capabilities implements ICapability {
*
* @return array{core: array{'user'?: array{language: string, locale: string, timezone: string}, 'can-create-app-token'?: bool } }
*/
#[\Override]
public function getCapabilities(): array {
$capabilities = [];

View file

@ -40,10 +40,12 @@ class ConfigLexicon implements ILexicon {
public const ON_DEMAND_PREVIEW_MIGRATION = 'on_demand_preview_migration';
#[\Override]
public function getStrictness(): Strictness {
return Strictness::IGNORE;
}
#[\Override]
public function getAppConfigs(): array {
return [
new Entry(
@ -104,6 +106,7 @@ class ConfigLexicon implements ILexicon {
];
}
#[\Override]
public function getUserConfigs(): array {
return [
new Entry(self::USER_LANGUAGE, ValueType::STRING, definition: 'language'),

View file

@ -28,6 +28,7 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob {
*
* @param array $argument
*/
#[\Override]
public function run($argument): void {
$this->log->info('Running background job to clean-up outdated updater backups');

View file

@ -30,6 +30,7 @@ class CheckForUserCertificates extends QueuedJob {
/**
* Checks all user directories for old user uploaded certificates
*/
#[\Override]
public function run($argument): void {
$uploadList = [];
$this->userManager->callForSeenUsers(function (IUser $user) use (&$uploadList): void {

View file

@ -22,6 +22,7 @@ class CleanupLoginFlowV2 extends TimedJob {
$this->setInterval(60 * 60);
}
#[\Override]
protected function run($argument): void {
$this->loginFlowV2Mapper->cleanup();
}

View file

@ -27,6 +27,7 @@ class ExpirePreviewsJob extends TimedJob {
$this->setInterval(60 * 60 * 24);
}
#[\Override]
protected function run(mixed $argument): void {
$days = $this->config->getSystemValueInt('preview_expiration_days');
if ($days <= 0) {

View file

@ -41,6 +41,7 @@ class GenerateMetadataJob extends TimedJob {
$this->setInterval(24 * 60 * 60);
}
#[\Override]
protected function run(mixed $argument): void {
if ($this->appConfig->getValueBool('core', 'metadataGenerationDone', false)) {
return;

View file

@ -26,6 +26,7 @@ class LookupServerSendCheckBackgroundJob extends QueuedJob {
/**
* @param array $argument
*/
#[\Override]
public function run($argument): void {
$this->userManager->callForSeenUsers(function (IUser $user): void {
// If the user data was not updated yet (check if LUS is enabled and if then update on LUS or delete on LUS)

View file

@ -23,6 +23,7 @@ class Disable extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('app:disable')
@ -34,6 +35,7 @@ class Disable extends Command implements CompletionAwareInterface {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appIds = $input->getArgument('app-id');
@ -65,6 +67,7 @@ class Disable extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context): array {
return [];
}
@ -74,6 +77,7 @@ class Disable extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'app-id') {
return array_diff(\OC_App::getEnabledApps(true, true), $this->appManager->getAlwaysEnabledApps());

View file

@ -32,6 +32,7 @@ class Enable extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('app:enable')
@ -55,6 +56,7 @@ class Enable extends Command implements CompletionAwareInterface {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appIds = $input->getArgument('app-id');
$groups = $this->resolveGroupIds($input->getOption('groups'));
@ -127,6 +129,7 @@ class Enable extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context): array {
if ($optionName === 'groups') {
return array_map(function (IGroup $group) {
@ -141,6 +144,7 @@ class Enable extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'app-id') {
$allApps = $this->appManager->getAllAppsInAppsFolders();

View file

@ -23,6 +23,7 @@ class GetPath extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
@ -44,6 +45,7 @@ class GetPath extends Base {
* @param OutputInterface $output An OutputInterface instance
* @return int 0 if everything went fine, or an error code
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
try {
@ -61,6 +63,7 @@ class GetPath extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'app') {
return $this->appManager->getAllAppsInAppsFolders();

View file

@ -25,6 +25,7 @@ class Install extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('app:install')
@ -55,6 +56,7 @@ class Install extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
$forceEnable = (bool)$input->getOption('force');

View file

@ -20,6 +20,7 @@ class ListApps extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
@ -47,6 +48,7 @@ class ListApps extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') {
$shippedFilter = $input->getOption('shipped') === 'true';
@ -127,6 +129,7 @@ class ListApps extends Base {
* @param CompletionContext $context
* @return array
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context): array {
if ($optionName === 'shipped') {
return ['true', 'false'];
@ -139,6 +142,7 @@ class ListApps extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context): array {
return [];
}

View file

@ -29,6 +29,7 @@ class Remove extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('app:remove')
@ -46,6 +47,7 @@ class Remove extends Command implements CompletionAwareInterface {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
@ -106,6 +108,7 @@ class Remove extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context): array {
return [];
}
@ -115,6 +118,7 @@ class Remove extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'app-id') {
return $this->manager->getEnabledApps();

View file

@ -27,6 +27,7 @@ class Update extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('app:update')
@ -63,6 +64,7 @@ class Update extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$singleAppId = $input->getArgument('app-id');
$updateFound = false;

View file

@ -23,6 +23,7 @@ class Delete extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('background-job:delete')
@ -34,6 +35,7 @@ class Delete extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$jobId = (string)$input->getArgument('job-id');

View file

@ -25,6 +25,7 @@ class Job extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('background-job:execute')
@ -43,6 +44,7 @@ class Job extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$jobId = (string)$input->getArgument('job-id');

View file

@ -28,6 +28,7 @@ class JobWorker extends JobBase {
) {
parent::__construct($jobList, $logger);
}
#[\Override]
protected function configure(): void {
parent::configure();
@ -61,6 +62,7 @@ class JobWorker extends JobBase {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$startTime = time();
$stopAfterOptionValue = $input->getOption('stop_after');

View file

@ -21,6 +21,7 @@ class ListCommand extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('background-job:list')
@ -48,6 +49,7 @@ class ListCommand extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$limit = (int)$input->getOption('limit');
$jobsInfo = $this->formatJobs($this->jobList->getJobsIterator($input->getOption('class'), $limit, (int)$input->getOption('offset')));

View file

@ -21,6 +21,7 @@ class Mode extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('background:cron')
@ -28,6 +29,7 @@ class Mode extends Command {
->setDescription('Use cron, ajax or webcron to run background jobs');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
/** @var 'background:cron'|'background:ajax'|'background:webcron' $command */
$command = $input->getArgument('command');

View file

@ -27,6 +27,7 @@ class Base extends Command implements CompletionAwareInterface {
private bool $php_pcntl_signal = false;
private bool $interrupted = false;
#[\Override]
protected function configure() {
// Some of our commands do not extend this class; and some of those that do do not call parent::configure()
$defaultHelp = 'More extensive and thorough documentation may be found at ' . Server::get(Defaults::class)->getDocBaseUrl() . PHP_EOL;
@ -208,6 +209,7 @@ class Base extends Command implements CompletionAwareInterface {
$this->interrupted = true;
}
#[\Override]
public function run(InputInterface $input, OutputInterface $output): int {
// check if the php pcntl_signal functions are accessible
$this->php_pcntl_signal = function_exists('pcntl_signal');
@ -225,6 +227,7 @@ class Base extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
if ($optionName === 'output') {
return ['plain', 'json', 'json_pretty'];
@ -237,6 +240,7 @@ class Base extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
return [];
}

View file

@ -22,6 +22,7 @@ class Test extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('broadcast:test')
@ -39,6 +40,7 @@ class Test extends Command {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$name = $input->getArgument('name');
$uid = $input->getArgument('uid');
@ -51,16 +53,19 @@ class Test extends Command {
parent::__construct();
}
#[\Override]
public function broadcastAs(): string {
return $this->name;
}
#[\Override]
public function getUids(): array {
return [
$this->uid,
];
}
#[\Override]
public function jsonSerialize(): array {
return [
'description' => 'this is a test event',

View file

@ -18,6 +18,7 @@ class Check extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
@ -27,6 +28,7 @@ class Check extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$errors = \OC_Util::checkServer($this->config);
if (!empty($errors)) {

View file

@ -24,6 +24,7 @@ abstract class Base extends \OC\Core\Command\Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
return $this->appConfig->getApps();

View file

@ -14,6 +14,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class DeleteConfig extends Base {
#[\Override]
protected function configure() {
parent::configure();
@ -39,6 +40,7 @@ class DeleteConfig extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');

View file

@ -15,6 +15,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class GetConfig extends Base {
#[\Override]
protected function configure() {
parent::configure();
@ -59,6 +60,7 @@ class GetConfig extends Base {
* @param OutputInterface $output An OutputInterface instance
* @return int 0 if everything went fine, or an error code
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');

View file

@ -19,6 +19,7 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
class SetConfig extends Base {
#[\Override]
protected function configure() {
parent::configure();
@ -75,6 +76,7 @@ class SetConfig extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');

View file

@ -26,6 +26,7 @@ class Import extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('config:import')
@ -38,6 +39,7 @@ class Import extends Command implements CompletionAwareInterface {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$importFile = $input->getArgument('file');
if ($importFile !== null) {
@ -183,6 +185,7 @@ class Import extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -192,6 +195,7 @@ class Import extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'file') {
$helper = new ShellPathCompletion(

View file

@ -28,6 +28,7 @@ class ListConfigs extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
@ -50,6 +51,7 @@ class ListConfigs extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$app = $input->getArgument('app');
$noSensitiveValues = !$input->getOption('private');
@ -136,6 +138,7 @@ class ListConfigs extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
return array_merge(['all', 'system'], \OC_App::getAllApps());

View file

@ -24,6 +24,7 @@ class Preset extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
$this->setName('config:preset')
@ -34,6 +35,7 @@ class Preset extends Base {
->addOption('compare', '', InputOption::VALUE_NONE, 'compare preset');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('list')) {
$this->getEnum('', $list);

View file

@ -21,6 +21,7 @@ abstract class Base extends \OC\Core\Command\Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'name') {
$words = $this->getPreviousNames($context, $context->getWordIndex());

View file

@ -20,6 +20,7 @@ class DeleteConfig extends Base {
parent::__construct($systemConfig);
}
#[\Override]
protected function configure() {
parent::configure();
@ -40,6 +41,7 @@ class DeleteConfig extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$configNames = $input->getArgument('name');
$configName = $configNames[0];

View file

@ -20,6 +20,7 @@ class GetConfig extends Base {
parent::__construct($systemConfig);
}
#[\Override]
protected function configure() {
parent::configure();
@ -47,6 +48,7 @@ class GetConfig extends Base {
* @param OutputInterface $output An OutputInterface instance
* @return int 0 if everything went fine, or an error code
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$configNames = $input->getArgument('name');
$configName = array_shift($configNames);

View file

@ -22,6 +22,7 @@ class SetConfig extends Base {
parent::__construct($systemConfig);
}
#[\Override]
protected function configure() {
parent::configure();
@ -55,6 +56,7 @@ class SetConfig extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$configNames = $input->getArgument('name');
$configName = $configNames[0];
@ -115,6 +117,7 @@ class SetConfig extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
if ($optionName === 'type') {
return ['string', 'integer', 'double', 'boolean', 'json', 'null'];

View file

@ -33,6 +33,7 @@ class AddMissingColumns extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:add-missing-columns')
@ -40,6 +41,7 @@ class AddMissingColumns extends Command {
->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$dryRun = $input->getOption('dry-run');

View file

@ -33,6 +33,7 @@ class AddMissingIndices extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:add-missing-indices')
@ -40,6 +41,7 @@ class AddMissingIndices extends Command {
->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$dryRun = $input->getOption('dry-run');

View file

@ -33,6 +33,7 @@ class AddMissingPrimaryKeys extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:add-missing-primary-keys')
@ -40,6 +41,7 @@ class AddMissingPrimaryKeys extends Command {
->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$dryRun = $input->getOption('dry-run');

View file

@ -24,6 +24,7 @@ class ConvertFilecacheBigInt extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:convert-filecache-bigint')
@ -53,6 +54,7 @@ class ConvertFilecacheBigInt extends Command {
];
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$schema = new SchemaWrapper($this->connection);
$isSqlite = $this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE;

View file

@ -27,12 +27,14 @@ class ConvertMysqlToMB4 extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:convert-mysql-charset')
->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_MYSQL) {
$output->writeln('This command is only valid for MySQL/MariaDB databases.');

View file

@ -45,6 +45,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('db:convert-type')
@ -159,6 +160,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
}
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->validateInput($input, $output);
$this->readPassword($input, $output);
@ -446,6 +448,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -457,6 +460,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'type') {
return ['mysql', 'oci', 'pgsql'];

View file

@ -22,6 +22,7 @@ class ExportSchema extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('db:schema:export')
@ -31,6 +32,7 @@ class ExportSchema extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$schema = $this->connection->createSchema();
$sql = $input->getOption('sql');

View file

@ -26,6 +26,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('migrations:execute')
@ -41,6 +42,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface {
* @param OutputInterface $output
* @return int
*/
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output));
@ -66,6 +68,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -75,6 +78,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
$allApps = \OC_App::getAllApps();

View file

@ -84,6 +84,7 @@ class {{classname}} extends SimpleMigrationStep {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('migrations:generate')
@ -94,6 +95,7 @@ class {{classname}} extends SimpleMigrationStep {
parent::configure();
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$version = $input->getArgument('version');
@ -148,6 +150,7 @@ class {{classname}} extends SimpleMigrationStep {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -157,6 +160,7 @@ class {{classname}} extends SimpleMigrationStep {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
$allApps = $this->appManager->getAllAppsInAppsFolders();

View file

@ -25,6 +25,7 @@ class GenerateMetadataCommand extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this->setName('migrations:generate-metadata')
->setHidden(true)
@ -33,6 +34,7 @@ class GenerateMetadataCommand extends Command {
parent::configure();
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln(
json_encode(

View file

@ -24,6 +24,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('migrations:migrate')
@ -34,6 +35,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface {
parent::configure();
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output));
@ -48,6 +50,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -57,6 +60,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
$allApps = \OC_App::getAllApps();

View file

@ -32,6 +32,7 @@ class PreviewCommand extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('migrations:preview')
@ -41,6 +42,7 @@ class PreviewCommand extends Command {
parent::configure();
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$version = $input->getArgument('version');
if (filter_var($version, FILTER_VALIDATE_URL)) {

View file

@ -24,6 +24,7 @@ class StatusCommand extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('migrations:status')
@ -31,6 +32,7 @@ class StatusCommand extends Command implements CompletionAwareInterface {
->addArgument('app', InputArgument::REQUIRED, 'Name of the app this migration command shall work on');
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output));
@ -54,6 +56,7 @@ class StatusCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -63,6 +66,7 @@ class StatusCommand extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
$allApps = \OC_App::getAllApps();

View file

@ -32,6 +32,7 @@ class ChangeKeyStorageRoot extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
$this
@ -44,6 +45,7 @@ class ChangeKeyStorageRoot extends Command {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$oldRoot = $this->util->getKeyStorageRoot();
$newRoot = $input->getArgument('newRoot');

View file

@ -52,6 +52,7 @@ class DecryptAll extends Command {
}
}
#[\Override]
protected function configure() {
parent::configure();
@ -70,6 +71,7 @@ class DecryptAll extends Command {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if (!$input->isInteractive()) {
$output->writeln('Invalid TTY.');

View file

@ -21,6 +21,7 @@ class Disable extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('encryption:disable')
@ -28,6 +29,7 @@ class Disable extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->config->getAppValue('core', 'encryption_enabled', 'no') !== 'yes') {
$output->writeln('Encryption is already disabled');

View file

@ -23,6 +23,7 @@ class Enable extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('encryption:enable')
@ -30,6 +31,7 @@ class Enable extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->config->getAppValue('core', 'encryption_enabled', 'no') === 'yes') {
$output->writeln('Encryption is already enabled');

View file

@ -49,6 +49,7 @@ class EncryptAll extends Command {
}
}
#[\Override]
protected function configure() {
parent::configure();
@ -63,6 +64,7 @@ class EncryptAll extends Command {
/**
* @throws \Exception
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if (!$input->isInteractive() && !$input->getOption('no-interaction')) {
$output->writeln('Invalid TTY.');

View file

@ -21,6 +21,7 @@ class ListModules extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
@ -30,6 +31,7 @@ class ListModules extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
if ($isMaintenanceModeEnabled) {

View file

@ -30,6 +30,7 @@ class MigrateKeyStorage extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -37,6 +38,7 @@ class MigrateKeyStorage extends Command {
->setDescription('Migrate the format of the keystorage to a newer format');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$root = $this->util->getKeyStorageRoot();

View file

@ -22,6 +22,7 @@ class SetDefaultModule extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
@ -36,6 +37,7 @@ class SetDefaultModule extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
if ($isMaintenanceModeEnabled) {

View file

@ -21,6 +21,7 @@ class ShowKeyStorageRoot extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
$this
@ -28,6 +29,7 @@ class ShowKeyStorageRoot extends Command {
->setDescription('Show current key storage root');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$currentRoot = $this->util->getKeyStorageRoot();

View file

@ -21,6 +21,7 @@ class Status extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
parent::configure();
@ -30,6 +31,7 @@ class Status extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->writeArrayInOutputFormat($input, $output, [
'enabled' => $this->encryptionManager->isEnabled(),

View file

@ -29,6 +29,7 @@ class Get extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this->setName('metadata:get')
->setDescription('get stored metadata about a file, by its id')
@ -68,6 +69,7 @@ class Get extends Command {
* @throws NoUserException
* @throws NotFoundException
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$fileId = (int)$input->getArgument('fileId');

View file

@ -23,6 +23,7 @@ class Add extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:add')
@ -40,6 +41,7 @@ class Add extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$gid = $input->getArgument('groupid');
$group = $this->groupManager->get($gid);

View file

@ -24,6 +24,7 @@ class AddUser extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:adduser')
@ -39,6 +40,7 @@ class AddUser extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$group = $this->groupManager->get($input->getArgument('group'));
if (is_null($group)) {
@ -59,6 +61,7 @@ class AddUser extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'group') {
return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord()));

View file

@ -23,6 +23,7 @@ class Delete extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:delete')
@ -34,6 +35,7 @@ class Delete extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$gid = $input->getArgument('groupid');
if ($gid === 'admin') {
@ -59,6 +61,7 @@ class Delete extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'groupid') {
return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord()));

View file

@ -24,6 +24,7 @@ class Info extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:info')
@ -41,6 +42,7 @@ class Info extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$gid = $input->getArgument('groupid');
$group = $this->groupManager->get($gid);
@ -64,6 +66,7 @@ class Info extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'groupid') {
return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord()));

View file

@ -21,6 +21,7 @@ class ListCommand extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:list')
@ -57,6 +58,7 @@ class ListCommand extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$groups = $this->groupManager->search((string)$input->getArgument('searchstring'), (int)$input->getOption('limit'), (int)$input->getOption('offset'));
$this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups, (bool)$input->getOption('info')));

View file

@ -24,6 +24,7 @@ class RemoveUser extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('group:removeuser')
@ -39,6 +40,7 @@ class RemoveUser extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$group = $this->groupManager->get($input->getArgument('group'));
if (is_null($group)) {
@ -59,6 +61,7 @@ class RemoveUser extends Base {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'group') {
return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord()));

View file

@ -43,6 +43,7 @@ class File extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('info:file')
@ -52,6 +53,7 @@ class File extends Command {
->addOption('storage-tree', null, InputOption::VALUE_NONE, 'Show storage and cache wrapping tree');
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$fileInput = $input->getArgument('file');
$showChildren = $input->getOption('children');

View file

@ -23,6 +23,7 @@ class Space extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('info:file:space')
@ -32,6 +33,7 @@ class Space extends Command {
->addOption('all', 'a', InputOption::VALUE_NONE, 'Display all items');
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$fileInput = $input->getArgument('file');
$count = (int)$input->getOption('count');

View file

@ -22,6 +22,7 @@ class Storage extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -30,6 +31,7 @@ class Storage extends Base {
->addArgument('storage', InputArgument::REQUIRED, 'Storage to get information for');
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$storage = $input->getArgument('storage');
$storageId = $this->fileUtils->getNumericStorageId($storage);

View file

@ -22,6 +22,7 @@ class Storages extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -31,6 +32,7 @@ class Storages extends Base {
->addOption('all', 'a', InputOption::VALUE_NONE, 'Display all storages');
}
#[\Override]
public function execute(InputInterface $input, OutputInterface $output): int {
$count = (int)$input->getOption('count');
$all = $input->getOption('all');

View file

@ -34,6 +34,7 @@ class CheckApp extends Base {
/**
* {@inheritdoc }
*/
#[\Override]
protected function configure() {
parent::configure();
$this
@ -47,6 +48,7 @@ class CheckApp extends Base {
/**
* {@inheritdoc }
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('all') && $input->getArgument('appid')) {
$output->writeln('<error>Option "--all" cannot be combined with an appid</error>');

View file

@ -29,6 +29,7 @@ class CheckCore extends Base {
/**
* {@inheritdoc }
*/
#[\Override]
protected function configure() {
parent::configure();
$this
@ -39,6 +40,7 @@ class CheckCore extends Base {
/**
* {@inheritdoc }
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if (!$this->checker->isCodeCheckEnforced()) {
$output->writeln('<comment>integrity:check-core can not be used on git checkouts</comment>');

View file

@ -31,6 +31,7 @@ class SignApp extends Command {
parent::__construct(null);
}
#[\Override]
protected function configure() {
$this
->setName('integrity:sign-app')
@ -43,6 +44,7 @@ class SignApp extends Command {
/**
* {@inheritdoc }
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$path = $input->getOption('path');
$privateKeyPath = $input->getOption('privateKey');

View file

@ -29,6 +29,7 @@ class SignCore extends Command {
parent::__construct(null);
}
#[\Override]
protected function configure() {
$this
->setName('integrity:sign-core')
@ -41,6 +42,7 @@ class SignCore extends Command {
/**
* {@inheritdoc }
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');

View file

@ -28,6 +28,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('l10n:createjs')
@ -44,6 +45,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$app = $input->getArgument('app');
$lang = $input->getArgument('lang');
@ -135,6 +137,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
return [];
}
@ -146,6 +149,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
return $this->appManager->getAllAppsInAppsFolders();

View file

@ -25,6 +25,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('log:file')
@ -50,6 +51,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$toBeSet = [];
@ -113,6 +115,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
if ($optionName === 'file') {
$helper = new ShellPathCompletion(
@ -132,6 +135,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
return [];
}

View file

@ -26,6 +26,7 @@ class Manage extends Command implements CompletionAwareInterface {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('log:manage')
@ -51,6 +52,7 @@ class Manage extends Command implements CompletionAwareInterface {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
// collate config setting to the end, to avoid partial configuration
$toBeSet = [];
@ -163,6 +165,7 @@ class Manage extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeOptionValues($optionName, CompletionContext $context) {
if ($optionName === 'backend') {
return ['file', 'syslog', 'errorlog', 'systemd'];
@ -179,6 +182,7 @@ class Manage extends Command implements CompletionAwareInterface {
* @param CompletionContext $context
* @return string[]
*/
#[\Override]
public function completeArgumentValues($argumentName, CompletionContext $context) {
return [];
}

View file

@ -21,12 +21,14 @@ class DataFingerprint extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:data-fingerprint')
->setDescription('update the systems data-fingerprint after a backup is restored');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$fingerPrint = md5($this->timeFactory->getTime());
$this->config->setSystemValue('data-fingerprint', $fingerPrint);

View file

@ -33,6 +33,7 @@ class Install extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('maintenance:install')
@ -53,6 +54,7 @@ class Install extends Command {
->addOption('server-secret', null, InputOption::VALUE_OPTIONAL, 'Server secret, at least ' . Setup::MIN_SECRET_LENGTH . ' characters (will be randomly generated if not provided)');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
// validate the environment
$setupHelper = Server::get(Setup::class);

View file

@ -25,6 +25,7 @@ class UpdateDB extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:mimetype:update-db')
@ -38,6 +39,7 @@ class UpdateDB extends Command {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$mappings = $this->mimetypeDetector->getAllMappings();

View file

@ -20,12 +20,14 @@ class UpdateJS extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:mimetype:update-js')
->setDescription('Update mimetypelist.js');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
// Fetch all the aliases
$aliases = $this->mimetypeDetector->getAllAliases();

View file

@ -23,6 +23,7 @@ class Mode extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:mode')
@ -42,6 +43,7 @@ class Mode extends Command {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$maintenanceMode = $this->config->getSystemValueBool('maintenance');
if ($input->getOption('on')) {

View file

@ -39,6 +39,7 @@ class Repair extends Command {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('maintenance:repair')
@ -50,6 +51,7 @@ class Repair extends Command {
'Use this option when you want to include resource and load expensive tasks');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$includeExpensive = (bool)$input->getOption('include-expensive');
$repairSteps = $this->repair::getRepairSteps($includeExpensive);

View file

@ -29,6 +29,7 @@ class RepairShareOwnership extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:repair-share-owner')
@ -37,6 +38,7 @@ class RepairShareOwnership extends Command {
->addArgument('user', InputArgument::OPTIONAL, 'User to fix incoming shares for, if omitted all users will be fixed');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$noConfirm = $input->getOption('no-confirm');
$userId = $input->getArgument('user');

View file

@ -15,12 +15,14 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class UpdateHtaccess extends Command {
#[\Override]
protected function configure() {
$this
->setName('maintenance:update:htaccess')
->setDescription('Updates the .htaccess file');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if (Setup::updateHtaccess()) {
$output->writeln('.htaccess has been updated');

View file

@ -23,12 +23,14 @@ class UpdateTheme extends UpdateJS {
parent::__construct($mimetypeDetector);
}
#[\Override]
protected function configure() {
$this
->setName('maintenance:theme:update')
->setDescription('Apply custom theme changes');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
// run mimetypelist.js update since themes might change mimetype icons
parent::execute($input, $output);

View file

@ -21,6 +21,7 @@ class DistributedClear extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('memcache:distributed:clear')
@ -29,6 +30,7 @@ class DistributedClear extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$cache = $this->cacheFactory->createDistributed();
$prefix = $input->getOption('prefix');

View file

@ -21,6 +21,7 @@ class DistributedDelete extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('memcache:distributed:delete')
@ -29,6 +30,7 @@ class DistributedDelete extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$cache = $this->cacheFactory->createDistributed();
$key = $input->getArgument('key');

View file

@ -21,6 +21,7 @@ class DistributedGet extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('memcache:distributed:get')
@ -29,6 +30,7 @@ class DistributedGet extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$cache = $this->cacheFactory->createDistributed();
$key = $input->getArgument('key');

View file

@ -24,6 +24,7 @@ class DistributedSet extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('memcache:distributed:set')
@ -40,6 +41,7 @@ class DistributedSet extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$cache = $this->cacheFactory->createDistributed();
$key = $input->getArgument('key');

View file

@ -23,6 +23,7 @@ class RedisCommand extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('memcache:redis:command')
@ -31,6 +32,7 @@ class RedisCommand extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$command = $input->getArgument('redis-command');
if (!$this->redisFactory->isAvailable()) {

View file

@ -30,12 +30,14 @@ class Cleanup extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('preview:cleanup')
->setDescription('Removes existing preview files');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->deletePreviewFromPreviewTable($output) !== 0) {
return 1;

View file

@ -29,6 +29,7 @@ class Generate extends Command {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('preview:generate')
@ -39,6 +40,7 @@ class Generate extends Command {
->addOption('mode', 'm', InputOption::VALUE_REQUIRED, "mode for generating uncropped previews, 'cover' or 'fill'", IPreview::MODE_FILL);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$fileInput = $input->getArgument('file');
$sizes = $input->getOption('size');

View file

@ -27,6 +27,7 @@ class ListRoutes extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -52,6 +53,7 @@ class ListRoutes extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$apps = $input->getArgument('app');
if (empty($apps)) {

View file

@ -29,6 +29,7 @@ class MatchRoute extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -49,6 +50,7 @@ class MatchRoute extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$context = new RequestContext(method: strtoupper($input->getOption('method')));
$this->router->setContext($context);

View file

@ -20,6 +20,7 @@ class BruteforceAttempts extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
parent::configure();
$this
@ -38,6 +39,7 @@ class BruteforceAttempts extends Base {
;
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$ip = $input->getArgument('ipaddress');

View file

@ -20,6 +20,7 @@ class BruteforceResetAttempts extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('security:bruteforce:reset')
@ -31,6 +32,7 @@ class BruteforceResetAttempts extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$ip = $input->getArgument('ipaddress');

View file

@ -20,12 +20,14 @@ class ExportCertificates extends Base {
parent::__construct();
}
#[\Override]
protected function configure(): void {
$this
->setName('security:certificates:export')
->setDescription('export the certificate bundle');
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$bundlePath = $this->certificateManager->getAbsoluteBundlePath();
$bundle = file_get_contents($bundlePath);

View file

@ -20,6 +20,7 @@ class ImportCertificate extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('security:certificates:import')
@ -31,6 +32,7 @@ class ImportCertificate extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$path = $input->getArgument('path');

View file

@ -27,6 +27,7 @@ class ListCertificates extends Base {
$this->l = $l10nFactory->get('core');
}
#[\Override]
protected function configure() {
$this
->setName('security:certificates')
@ -34,6 +35,7 @@ class ListCertificates extends Base {
parent::configure();
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$outputType = $input->getOption('output');
if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) {

View file

@ -20,6 +20,7 @@ class RemoveCertificate extends Base {
parent::__construct();
}
#[\Override]
protected function configure() {
$this
->setName('security:certificates:remove')
@ -31,6 +32,7 @@ class RemoveCertificate extends Base {
);
}
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$name = $input->getArgument('name');

Some files were not shown because too many files have changed in this diff Show more