[options] Options: --confirm Execute the deactivation handler --dry-run Validate the handler without executing The module does not need to be in the enabled list. USAGE; } public function execute(array $args, array $options): int { $moduleId = $args[0] ?? ''; if ($moduleId === '') { fwrite(STDERR, $this->usage() . "\n"); return 1; } // Rebuild global argv for the underlying script global $argv; $argv = ['module-deactivate.php', $moduleId]; if ($options['confirm'] ?? false) { $argv[] = '--confirm'; } if ($options['dry-run'] ?? false) { $argv[] = '--dry-run'; } $this->requireBinScript('module-deactivate.php'); return moduleDeactivateRun(); } }