diff --git a/src/Command/AngularHtmlListCommand.php b/src/Command/AngularHtmlListCommand.php
index 907488c..7a0c4af 100644
--- a/src/Command/AngularHtmlListCommand.php
+++ b/src/Command/AngularHtmlListCommand.php
@@ -37,7 +37,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!$input->getOption('user')) {
$output->getErrorOutput()->writeln("For a full list, try passing --user=[username].");
diff --git a/src/Command/AngularHtmlShowCommand.php b/src/Command/AngularHtmlShowCommand.php
index 055810d..41801d2 100644
--- a/src/Command/AngularHtmlShowCommand.php
+++ b/src/Command/AngularHtmlShowCommand.php
@@ -41,7 +41,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!$input->getOption('user')) {
$output->getErrorOutput()->writeln("For a full list, try passing --user=[username].");
diff --git a/src/Command/AngularModuleListCommand.php b/src/Command/AngularModuleListCommand.php
index 8f5c62c..c54766a 100644
--- a/src/Command/AngularModuleListCommand.php
+++ b/src/Command/AngularModuleListCommand.php
@@ -39,7 +39,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!$input->getOption('user')) {
$output->getErrorOutput()->writeln("For a full list, try passing --user=[username].");
diff --git a/src/Command/Api4Command.php b/src/Command/Api4Command.php
index 6834e4b..9c12af3 100644
--- a/src/Command/Api4Command.php
+++ b/src/Command/Api4Command.php
@@ -125,7 +125,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$C = '';
$_C = '';
$I = '';
diff --git a/src/Command/ApiCommand.php b/src/Command/ApiCommand.php
index 8341ae8..0c1f1eb 100644
--- a/src/Command/ApiCommand.php
+++ b/src/Command/ApiCommand.php
@@ -50,7 +50,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$C = '';
$_C = '';
$I = '';
diff --git a/src/Command/CliCommand.php b/src/Command/CliCommand.php
index 872e99a..9dca5f2 100644
--- a/src/Command/CliCommand.php
+++ b/src/Command/CliCommand.php
@@ -21,7 +21,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$cv = new Application();
@@ -32,6 +32,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
// new ApiMatcher(),
//));
$sh->run();
+ return 0;
}
}
diff --git a/src/Command/CoreCheckReqCommand.php b/src/Command/CoreCheckReqCommand.php
index f82c122..c6af514 100644
--- a/src/Command/CoreCheckReqCommand.php
+++ b/src/Command/CoreCheckReqCommand.php
@@ -38,7 +38,7 @@ protected function configure() {
$this->configureBootOptions('none');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$filterSeverities = $this->parseFilter($input);
$showBootMsgsByDefault = in_array($input->getOption('out'), ['table', 'pretty']);
diff --git a/src/Command/CoreInstallCommand.php b/src/Command/CoreInstallCommand.php
index c8fcb0f..7616603 100644
--- a/src/Command/CoreInstallCommand.php
+++ b/src/Command/CoreInstallCommand.php
@@ -52,7 +52,7 @@ protected function configure() {
$this->configureBootOptions('none');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$setup = $this->bootSetupSubsystem($input, $output);
$debugMode = FALSE;
diff --git a/src/Command/CoreUninstallCommand.php b/src/Command/CoreUninstallCommand.php
index fe49904..d6563fc 100644
--- a/src/Command/CoreUninstallCommand.php
+++ b/src/Command/CoreUninstallCommand.php
@@ -31,7 +31,7 @@ protected function configure() {
$this->configureBootOptions('none');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$setup = $this->bootSetupSubsystem($input, $output);
$debugEvent = $this->parseOptionalOption($input, ['--debug-event'], NULL, '');
@@ -74,6 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$output->writeln(sprintf("Removing %s from %s", basename($setup->getModel()->settingsPath), dirname($setup->getModel()->settingsPath)));
$setup->uninstallFiles();
}
+
+ return 0;
}
}
diff --git a/src/Command/EditCommand.php b/src/Command/EditCommand.php
index 751ca27..6e5f354 100644
--- a/src/Command/EditCommand.php
+++ b/src/Command/EditCommand.php
@@ -46,7 +46,7 @@ public function __construct($name = NULL) {
});
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$config = Config::read();
diff --git a/src/Command/EvalCommand.php b/src/Command/EvalCommand.php
index 0c854ad..69e9d0f 100644
--- a/src/Command/EvalCommand.php
+++ b/src/Command/EvalCommand.php
@@ -40,7 +40,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if ($input->getOption('out') === 'auto') {
diff --git a/src/Command/ExtensionDisableCommand.php b/src/Command/ExtensionDisableCommand.php
index d3b73f2..abc058a 100644
--- a/src/Command/ExtensionDisableCommand.php
+++ b/src/Command/ExtensionDisableCommand.php
@@ -37,7 +37,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
list ($foundKeys, $missingKeys) = $this->parseKeys($input, $output);
diff --git a/src/Command/ExtensionDownloadCommand.php b/src/Command/ExtensionDownloadCommand.php
index 3485234..f5820af 100644
--- a/src/Command/ExtensionDownloadCommand.php
+++ b/src/Command/ExtensionDownloadCommand.php
@@ -68,7 +68,7 @@ protected function initialize(InputInterface $input, OutputInterface $output) {
parent::initialize($input, $output);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$fs = new Filesystem();
if ($extRepoUrl = $this->parseRepoUrl($input)) {
diff --git a/src/Command/ExtensionEnableCommand.php b/src/Command/ExtensionEnableCommand.php
index 10d7955..0de3bba 100644
--- a/src/Command/ExtensionEnableCommand.php
+++ b/src/Command/ExtensionEnableCommand.php
@@ -40,7 +40,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
// Refresh extensions if (a) ---refresh enabled or (b) there's a cache-miss.
diff --git a/src/Command/ExtensionListCommand.php b/src/Command/ExtensionListCommand.php
index fe88c68..a2df171 100644
--- a/src/Command/ExtensionListCommand.php
+++ b/src/Command/ExtensionListCommand.php
@@ -49,7 +49,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$wo = ($input->getOption('out') === 'table')
? (OutputInterface::OUTPUT_NORMAL | OutputInterface::VERBOSITY_NORMAL)
: (OutputInterface::OUTPUT_NORMAL | OutputInterface::VERBOSITY_VERBOSE);
diff --git a/src/Command/ExtensionUninstallCommand.php b/src/Command/ExtensionUninstallCommand.php
index 691d2ed..839ab59 100644
--- a/src/Command/ExtensionUninstallCommand.php
+++ b/src/Command/ExtensionUninstallCommand.php
@@ -37,7 +37,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
list ($foundKeys, $missingKeys) = $this->parseKeys($input, $output);
diff --git a/src/Command/FillCommand.php b/src/Command/FillCommand.php
index 9d4d0d5..fb332d2 100644
--- a/src/Command/FillCommand.php
+++ b/src/Command/FillCommand.php
@@ -58,7 +58,7 @@ public function __construct($name = NULL) {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!$input->getOption('file')) {
$reader = new SiteConfigReader(CIVICRM_SETTINGS_PATH);
@@ -105,6 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
});
$output->writeln(sprintf("Please edit %s", Config::getFileName()));
}
+ return 0;
}
}
diff --git a/src/Command/FlushCommand.php b/src/Command/FlushCommand.php
index fad0391..b522a90 100644
--- a/src/Command/FlushCommand.php
+++ b/src/Command/FlushCommand.php
@@ -22,7 +22,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// The main reason we have this as separate command -- so we can ignore
// stale class-references that might be retained by the container cache.
define('CIVICRM_CONTAINER_CACHE', 'never');
diff --git a/src/Command/HttpCommand.php b/src/Command/HttpCommand.php
index d8c43c4..c79b78c 100644
--- a/src/Command/HttpCommand.php
+++ b/src/Command/HttpCommand.php
@@ -46,7 +46,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$method = $input->getOption('request');
@@ -67,6 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$statusCode = $this->sendRequest($output, $method, $row['value'], array_merge($headers, $row['headers'] ?? []), $data);
return ($statusCode >= 200 && $statusCode < 300) ? 0 : $statusCode;
}
+ return 0;
}
/**
diff --git a/src/Command/PathCommand.php b/src/Command/PathCommand.php
index bc84848..20348d8 100644
--- a/src/Command/PathCommand.php
+++ b/src/Command/PathCommand.php
@@ -58,7 +58,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!$input->getOption('ext') && !$input->getOption('config') && !$input->getOption('dynamic')) {
diff --git a/src/Command/PipeCommand.php b/src/Command/PipeCommand.php
index 8b5f258..25d4140 100644
--- a/src/Command/PipeCommand.php
+++ b/src/Command/PipeCommand.php
@@ -50,7 +50,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
if (!is_callable(['Civi', 'pipe'])) {
fwrite(STDERR, "This version of CiviCRM does not include Civi::pipe() support.\n");
diff --git a/src/Command/ScriptCommand.php b/src/Command/ScriptCommand.php
index 994f228..08e58f0 100644
--- a/src/Command/ScriptCommand.php
+++ b/src/Command/ScriptCommand.php
@@ -21,7 +21,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$fs = new Filesystem();
$origScript = $fs->toAbsolutePath($input->getArgument('script'));
$scriptArguments = $input->getArgument('scriptArguments');
diff --git a/src/Command/SettingGetCommand.php b/src/Command/SettingGetCommand.php
index 34bb9f2..6bdd276 100644
--- a/src/Command/SettingGetCommand.php
+++ b/src/Command/SettingGetCommand.php
@@ -71,7 +71,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$filter = $this->createSettingFilter($input->getArgument('name'));
diff --git a/src/Command/SettingRevertCommand.php b/src/Command/SettingRevertCommand.php
index 7d3293c..15420cd 100644
--- a/src/Command/SettingRevertCommand.php
+++ b/src/Command/SettingRevertCommand.php
@@ -62,7 +62,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$errorOutput = is_callable([$output, 'getErrorOutput']) ? $output->getErrorOutput() : $output;
diff --git a/src/Command/SettingSetCommand.php b/src/Command/SettingSetCommand.php
index f1e11ce..5b91595 100644
--- a/src/Command/SettingSetCommand.php
+++ b/src/Command/SettingSetCommand.php
@@ -85,7 +85,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$C = '';
$_C = '';
$I = '';
diff --git a/src/Command/SqlCliCommand.php b/src/Command/SqlCliCommand.php
index ea97056..2b353e0 100644
--- a/src/Command/SqlCliCommand.php
+++ b/src/Command/SqlCliCommand.php
@@ -47,7 +47,7 @@ protected function initialize(InputInterface $input, OutputInterface $output) {
}
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->boot($input, $output);
$datasource = new Datasource();
diff --git a/src/Command/UpgradeCommand.php b/src/Command/UpgradeCommand.php
index 48853bd..cbf3e87 100644
--- a/src/Command/UpgradeCommand.php
+++ b/src/Command/UpgradeCommand.php
@@ -24,7 +24,7 @@ protected function configure() {
// parent::configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
throw new \RuntimeException("FIXME: Calls to run() should be escaped, e.g. with Process::sprintf()");
diff --git a/src/Command/UpgradeDlCommand.php b/src/Command/UpgradeDlCommand.php
index a9931ee..7b1c7e6 100644
--- a/src/Command/UpgradeDlCommand.php
+++ b/src/Command/UpgradeDlCommand.php
@@ -37,7 +37,7 @@ protected function configure() {
// parent::configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// Figure out the URL, whether specified or automatic
$url = $input->getOption('url');
if (empty($url)) {
@@ -114,6 +114,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$result['installedTo'] = $dest;
$this->sendResult($input, $output, $result);
+ return 0;
}
/**
diff --git a/src/Command/UpgradeGetCommand.php b/src/Command/UpgradeGetCommand.php
index 483e874..56f358a 100644
--- a/src/Command/UpgradeGetCommand.php
+++ b/src/Command/UpgradeGetCommand.php
@@ -42,7 +42,7 @@ protected function configure() {
$this->configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$result = array();
$exitCode = 0;
$stability = $input->getOption('stability');
diff --git a/src/Command/UpgradeReportCommand.php b/src/Command/UpgradeReportCommand.php
index 25d4776..eaf9b36 100644
--- a/src/Command/UpgradeReportCommand.php
+++ b/src/Command/UpgradeReportCommand.php
@@ -55,7 +55,7 @@ protected function configure() {
// parent::configureBootOptions();
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// $report will be POSTed too https://upgrade.civicrm.org/report.
// See also: https://github.com/civicrm/civicrm-dist-manager#route-post-report-web-service
@@ -111,6 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$report['response'] = $this->reportToCivi($report);
$this->sendResult($input, $output, $report);
+ return 0;
}
/**
diff --git a/src/Command/UrlCommand.php b/src/Command/UrlCommand.php
index 349dffb..b712836 100644
--- a/src/Command/UrlCommand.php
+++ b/src/Command/UrlCommand.php
@@ -76,7 +76,7 @@ protected function initialize(InputInterface $input, OutputInterface $output) {
}
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
if (in_array($input->getOption('out'), Encoder::getTabularFormats())
&& !in_array($input->getOption('out'), Encoder::getFormats())) {
$input->setOption('tabular', TRUE);